Roberto Ierusalimschy
c25d59a6bd
format "%s" in 'string.format' accepts embedded zeros when it
...
has no modifiers
2015-11-25 14:28:17 -02:00
Roberto Ierusalimschy
5936eb16d8
randomness in 'table.sort' used only when needed (big imbalance in
...
partition result) + small refactoring
2015-11-25 10:48:57 -02:00
Roberto Ierusalimschy
7dc3ca7b8e
handling 'clock_t' and 'time_t' correctly in ISO C point of view
2015-11-24 14:54:32 -02:00
Roberto Ierusalimschy
71344b5cac
easy the way to accept other modifiers for 'mode' in 'io.open'
2015-11-23 09:36:11 -02:00
Roberto Ierusalimschy
f230898ad6
tiny code refactoring in 'luaS_hash'
2015-11-23 09:32:51 -02:00
Roberto Ierusalimschy
3feb702df8
ensure argument to 'string.format("%s")' does not contain zeros
2015-11-23 09:31:21 -02:00
Roberto Ierusalimschy
c5112f7b15
details (comments)
2015-11-23 09:30:45 -02:00
Roberto Ierusalimschy
c231a5e2b6
using unsigned int (instead of int) in 'table.sort' to avoid overflows
...
(when computing the pivot and in original table size)
2015-11-23 09:17:31 -02:00
Roberto Ierusalimschy
dc9ac5b8c2
details (merging declarations with initialization)
2015-11-23 09:09:27 -02:00
Roberto Ierusalimschy
146508b28e
randomness in pivot for 'table.sort' done by a macro (easier to change)
2015-11-20 10:30:20 -02:00
Roberto Ierusalimschy
d103312661
details (typos in comments)
2015-11-19 17:16:22 -02:00
Roberto Ierusalimschy
2e8f8a18e4
detail
2015-11-17 14:00:28 -02:00
Roberto Ierusalimschy
f5b0459aba
details
2015-11-13 15:19:46 -02:00
Roberto Ierusalimschy
d682b3c9ec
added separator for bugs in 5.3.1
2015-11-13 15:19:07 -02:00
Roberto Ierusalimschy
fc085aa627
new release number (5.3.2)
2015-11-13 15:18:42 -02:00
Roberto Ierusalimschy
9a5d6aedb7
trying to optimize a little 'luaD_poscall'
2015-11-13 11:24:26 -02:00
Roberto Ierusalimschy
89e3a84344
removed field 'n' from 'CallInfo' (not being used right now)
2015-11-13 10:16:51 -02:00
Roberto Ierusalimschy
04587b6256
macro with empty argument can be seen as macro with no argument; better
...
to avoid that
2015-11-12 16:08:58 -02:00
Roberto Ierusalimschy
bde03eeb48
in 'table.sort': tighter checks for invalid order function +
...
"random" pivot for larger intervals (to avoid attacks with
bad data)
2015-11-12 16:07:25 -02:00
Roberto Ierusalimschy
330d426ffd
avoid the use of deprecated functions 'luaL_checkunsigned'/
...
'lua_pushunsigned'
2015-11-11 17:08:09 -02:00
Roberto Ierusalimschy
02340375be
janitor work on 'table.sort': added comments, partition code moved
...
to a separated function, code conventions updated, etc. No changes
at all in the logic/algorithm
2015-11-06 14:07:14 -02:00
Roberto Ierusalimschy
5100bc8aa1
no need for a special case to get long strings (not that common)
2015-11-03 16:35:21 -02:00
Roberto Ierusalimschy
ebb2afa54b
allow 'set' macros to be used when 'L' is not available (as it was
...
needed only for assertions)
2015-11-03 16:33:10 -02:00
Roberto Ierusalimschy
7485512384
added comment and assert about dead keys
2015-11-03 16:10:44 -02:00
Roberto Ierusalimschy
46de77b219
bug: despite its name, 'luaH_getstr' did not work for strings in
...
general, but only for short strings
2015-11-03 13:47:30 -02:00
Roberto Ierusalimschy
d356183402
new function 'luaS_hashlongstr'
2015-11-03 13:36:01 -02:00
Roberto Ierusalimschy
e61ee8a036
in 'luaD_call', use two functions instead of one with fixed boolean
...
argument + stack error handling in 'luaD_call' moved to a separated
function
2015-11-02 16:48:49 -02:00
Roberto Ierusalimschy
ff1289a361
in 'luaD_call', use two functions instead of one with fixed boolean
...
argument
2015-11-02 16:48:07 -02:00
Roberto Ierusalimschy
cd73f3ccc5
now that we have a counter for CallInfos, use it for a more
...
accurate value for the memory used by a thread
2015-11-02 14:19:29 -02:00
Roberto Ierusalimschy
8c1fb91802
macro 'incr_top' replaced by function 'luaD_inctop'. (It is not used
...
in critical time pathes, can save a few bytes without the macro)
2015-11-02 14:09:30 -02:00
Roberto Ierusalimschy
33b366ec32
added counters for total and individual CallInfo entries (to allow
...
better syncronization between CallInfo size and stack size)
2015-11-02 14:01:41 -02:00
Roberto Ierusalimschy
c5363a1b58
in 'luaD_precall', in vararg functions, complete missing parameters
...
only after moving them to final place (avoids checking the stack
again)
2015-11-02 12:06:01 -02:00
Roberto Ierusalimschy
332a06bbd1
'luaO_pushvfstring' now uses 'incr_top' to increment top.
2015-11-02 12:02:35 -02:00
Roberto Ierusalimschy
ffd0d1232d
using more "conventional" loops in 'luaD_poscall' (probably a little
...
more efficient?)
2015-11-02 09:48:59 -02:00
Roberto Ierusalimschy
07a2dcacbf
flag CIST_REENTRY changed to CIST_FRESH (its negation); fresh invocations
...
seem to be less frequent than reentries. (So, avoid setting flag on
the frequent case.)
2015-11-02 09:43:17 -02:00
Roberto Ierusalimschy
c874abac98
with 'fast tracks', there is no need to do raw accesses in 'ipairs'
2015-10-29 13:21:04 -02:00
Roberto Ierusalimschy
789e423b32
corrected comparisons of signed (int) with unsigned (size_t)
2015-10-29 13:11:41 -02:00
Roberto Ierusalimschy
96ec8671b1
macro 'buff2num' replaced by its body (it caused more harm than good
...
to readability)
2015-10-28 16:51:47 -02:00
Roberto Ierusalimschy
cc3a42b190
option 'c' in 'string.pack' accepts any string size (truncating
...
if larger and padding if smaller)
2015-10-28 15:56:51 -02:00
Roberto Ierusalimschy
6707ce6349
function prepares vararg only if it really uses them (chunks
...
are always declared vararg but seldom uses them)
2015-10-28 15:28:40 -02:00
Roberto Ierusalimschy
257961c601
OP_SELF can use 'luaV_fastget' specialized for strings, as it
...
is applied only to string keys
2015-10-28 12:50:09 -02:00
Roberto Ierusalimschy
ae515a346c
comments for luaD_precall/luaD_poscall
2015-10-28 10:25:36 -02:00
Roberto Ierusalimschy
3cdf1d676b
details (avoid 'case' inside block + avoid using one variable for
...
two roles)
2015-10-28 10:06:45 -02:00
Roberto Ierusalimschy
82129b9266
use macro 'hasjumps' to test whether expression has jumps...
2015-10-26 12:27:47 -02:00
Roberto Ierusalimschy
8004ab756f
hook test in 'luaV_execute' reduced to minimum (rest done in
...
'luaG_traceexec'; no difference in performance for the non-hook
case, but keeps 'luaV_execute' a little simpler) + 'base' updates
replaced by 'Protect' (which serves this rule)
2015-10-22 12:40:47 -02:00
Roberto Ierusalimschy
ee5ef0f295
hook test in 'luaV_execute' reduced to minimum (rest done in
...
'luaG_traceexec'
2015-10-22 12:40:47 -02:00
Roberto Ierusalimschy
5bdee4f810
small changes to allow 'precall' to spend time preserving 'func'
...
only when needed (that is, when stack actually changes)
2015-10-21 16:40:47 -02:00
Roberto Ierusalimschy
48098c42ff
generic definitions for float types moved to before variable definitions
...
(so that specific cases can redefine these generic definitions if
needed)
2015-10-21 16:17:40 -02:00
Roberto Ierusalimschy
3ad55386c4
'condchangemem' also may need to run 'pre'/'pos'
2015-10-21 16:15:15 -02:00
Roberto Ierusalimschy
caf8278710
added comments
2015-10-20 16:00:19 -02:00
Roberto Ierusalimschy
f7670781cf
cleaner definition for 'luaC_condGC', using 'pre'/'pos' parameters
2015-10-20 15:56:21 -02:00
Roberto Ierusalimschy
df8b996bcc
'Protect' in table operations is not needed in the fast track
...
+ removal of a few dead macros
2015-10-20 15:41:35 -02:00
Roberto Ierusalimschy
75d5a8924c
macro 'addbuff' was using external variable name, instead of using
...
its parameter name inside the macro.
2015-10-20 11:11:05 -02:00
Roberto Ierusalimschy
880f82d089
'*' as a number means stack size, so that "return *" returns
...
all values in the stack.
2015-10-12 13:38:19 -03:00
Roberto Ierusalimschy
1a741157cb
avoid (undefined behavior) integer 'overflow' in left shift
2015-10-08 12:55:35 -03:00
Roberto Ierusalimschy
0c78de0d6d
avoid calling write function with empty block
2015-10-08 12:53:49 -03:00
Roberto Ierusalimschy
df45f7118b
detail (added assertion)
2015-10-08 12:53:31 -03:00
Roberto Ierusalimschy
880df57e52
detail (removed unreacheable 'break')
2015-10-08 12:53:05 -03:00
Roberto Ierusalimschy
8949904783
allow NULL string when length is zero in 'lua_pushlstring' and
...
'luaL_addlstring'
2015-10-06 13:10:22 -03:00
Roberto Ierusalimschy
9294466234
detail (string cache a bit smaller by default)
2015-10-06 11:29:49 -03:00
Roberto Ierusalimschy
e290bd6760
in 'luaL_traceback', print correct number of levels even when
...
initial level is not 1.
2015-10-02 12:46:49 -03:00
Roberto Ierusalimschy
dc4232379d
detail (ensure subtraction is done unsigned)
2015-10-02 12:39:23 -03:00
Roberto Ierusalimschy
10fffcd80a
'gmatch' keeps its state in a userdata (keeping the same 'MatchState'
...
across calls)
2015-09-28 15:05:01 -03:00
Roberto Ierusalimschy
8264dbc2bb
implemented counter to abort non-linear behavior in pattern matching
2015-09-26 15:45:03 -03:00
Roberto Ierusalimschy
9fae7b6d3f
code for string cache generalized for "associative sets" (compiler
...
will optimize away or inline the extra loops)
2015-09-22 11:18:24 -03:00
Roberto Ierusalimschy
0f1f51be4b
'table.move' tries to copy elements in increasing order
...
whenever possible
2015-09-17 12:53:50 -03:00
Roberto Ierusalimschy
ee5edb6b68
macros 'getaddrstr' and 'getstr' unified (they do the same thing)
2015-09-17 12:51:05 -03:00
Roberto Ierusalimschy
bda83e22c0
'tablib' does not try to use raw operations when possible: fast
...
track should make standard operations fast enough to forgo
raw accesses
2015-09-09 12:42:30 -03:00
Roberto Ierusalimschy
364cdbdbdb
'setobj2t' incorporated into 'luaV_fastset' + 'invalidateTMcache'
...
is not needed in the fast track (as it does not create new
entries) + small bug in 'auxsetstr' (calling barrier with wrong
object) + using 'setobj2t' without side effects in its arguments
2015-09-09 10:45:50 -03:00
Roberto Ierusalimschy
b91bc93fd3
'setobj2t' incorporated into 'luaV_fastset' + 'invalidateTMcache'
...
is not needed in the fast track (as it does not create new
entries)
2015-09-09 10:44:07 -03:00
Roberto Ierusalimschy
53be1451a8
new definition for macro 'checkliveness'
2015-09-08 13:55:43 -03:00
Roberto Ierusalimschy
eb0be12ceb
detail in macro 'checkliveness' + macro 'setobj2t' defined as an
...
expression (to be used in macro 'luaV_fastset')
2015-09-08 13:54:52 -03:00
Roberto Ierusalimschy
1198d82530
'lua_longassert' defined as an expression (instead of a command)
2015-09-08 13:53:56 -03:00
Roberto Ierusalimschy
6556fcfe5a
small janitor work
2015-09-08 12:49:25 -03:00
Roberto Ierusalimschy
41964648ee
long strings are created directly in final position when possible
...
(instead of using an auxiliar buffer to first create the string
and then allocate the final string and copy result there)
2015-09-08 12:41:05 -03:00
Roberto Ierusalimschy
502214f8a5
added assert for NULL pointer in 'lua_pushlstring'
2015-08-25 15:50:37 -03:00
Roberto Ierusalimschy
ed19fe766c
added ';' at the end of "expression lines" ("return exp;") so that
...
an extra ";" at the end is enough to stop Lua printing the result
("return exp;;" is not valid)
2015-08-14 16:11:20 -03:00
Roberto Ierusalimschy
8f25d08637
'invalidateTMcache' not needed in all 'settable' uses
2015-08-03 17:40:26 -03:00
Roberto Ierusalimschy
3b795541c4
fast track for 'settable'
2015-08-03 16:50:49 -03:00
Roberto Ierusalimschy
20b9e59441
barrier macros rewritten as expressions
2015-08-03 16:40:42 -03:00
Roberto Ierusalimschy
935d9f7f90
new entry should not be commented out
2015-07-23 11:32:17 -03:00
Roberto Ierusalimschy
e247c3ada3
implementation of fast track for gettable operations
2015-07-20 15:24:50 -03:00
Roberto Ierusalimschy
b5dc2f9b0c
bug: 'io.lines' does not check maximum number of options
2015-07-20 13:37:12 -03:00
Roberto Ierusalimschy
5273477cb9
in 'lua_number2strx', use the call to 'l_sprintf' to add exponent
...
to result directly
2015-07-20 13:30:22 -03:00
Roberto Ierusalimschy
b9db9bd0ef
'lua_Number' added to 'L_Umaxalign' union
2015-07-15 12:57:13 -03:00
Roberto Ierusalimschy
050e8536bb
bug: 'io.lines' does not check maximum number of options
2015-07-15 11:40:28 -03:00
Roberto Ierusalimschy
2b61360d82
avoid overflows (detected with 'clang -ftrapv')
2015-07-13 10:30:03 -03:00
Roberto Ierusalimschy
5b6ac971f9
detail (comment)
2015-07-07 14:03:34 -03:00
Roberto Ierusalimschy
403e181d81
'strftime' puts its result directly into 'lua_Buffer'
2015-07-06 12:16:51 -03:00
Roberto Ierusalimschy
4af03c5ae1
better treatment for integer overflows + all errors throw an error
...
(instead of returning nil)
2015-07-04 13:35:14 -03:00
Roberto Ierusalimschy
bde17a419d
because of debt, 'totalbytes' can be negative (and therefore its
...
type must be signed)
2015-07-04 13:33:17 -03:00
Roberto Ierusalimschy
8950e0c049
avoid possibility of subtle arith. overflow
2015-07-04 13:32:34 -03:00
Roberto Ierusalimschy
8217e0d4fe
avoid subtle possibility of arithmetic overflow
2015-07-04 13:31:42 -03:00
Roberto Ierusalimschy
319ccfefbc
computations in numerical for loop must avoid overflows too
2015-07-04 13:31:03 -03:00
Roberto Ierusalimschy
6a8400ba4f
using 'clang' by default + changes in warnings ('old-style-declaration'
...
removed because it is included in 'extra' + 'strict-aliasing' removed
because it is included in 'all' + 'aggregate-return' removed because
no one would do it by mistake)
2015-07-01 14:52:09 -03:00
Roberto Ierusalimschy
2de3361c6c
detail
2015-07-01 14:47:12 -03:00
Roberto Ierusalimschy
e89763e964
simpler code for 'luaO_fb2int'
2015-06-26 16:32:07 -03:00
Roberto Ierusalimschy
be63d995c1
tiny bug: 'randomseed' was calling 'rand' (instead of 'l_rand')
...
to discard first value
2015-06-26 16:30:32 -03:00
Roberto Ierusalimschy
2b1fc1b38c
with string cache, it is not that important for 'type' to avoid
...
'lua_pushstring'
2015-06-26 16:25:45 -03:00
Roberto Ierusalimschy
f01c12c891
detail (cast to avoid mixing types in conditional expression)
2015-06-25 11:00:01 -03:00
Roberto Ierusalimschy
5aabb7a891
buffer size changed from size_t to int (it is always small) +
...
comments + assert that printf result fits in given buffer
2015-06-24 15:25:10 -03:00
Roberto Ierusalimschy
cb1e451999
detail
2015-06-24 15:23:57 -03:00
Roberto Ierusalimschy
43cff79bf7
detail
2015-06-21 10:50:29 -03:00
Roberto Ierusalimschy
95c3144393
redefine 'l_sprintf' to test correctness of buffer sizes given
...
to 'snprintf'
2015-06-18 11:27:44 -03:00
Roberto Ierusalimschy
19eb6ae580
using 'snprintf' in C99 (both for documentation of buffer sizes
...
and some complains from tools)
2015-06-18 11:26:05 -03:00
Roberto Ierusalimschy
cbe05b48bb
using 'lua_longassert' to avoid warnings
2015-06-18 11:25:26 -03:00
Roberto Ierusalimschy
e7f34ad395
better implementation for buffers (reallocated memory directly
...
with allocation function; generates much less garbage)
2015-06-18 11:23:14 -03:00
Roberto Ierusalimschy
a5cbb7c3a7
detail (i + 1 > exp is simply i >= exp)
2015-06-18 11:20:32 -03:00
Roberto Ierusalimschy
dcad08b76d
details (use original type when saving variable's value)
2015-06-18 11:19:52 -03:00
Roberto Ierusalimschy
afbf5c5dab
missing ']]' in long string
2015-06-18 11:05:28 -03:00
Roberto Ierusalimschy
a1415c0d72
bug in order NaN x int (tests must ensure that NaN does not get
...
converted to integer)
2015-06-09 12:53:35 -03:00
Roberto Ierusalimschy
2ecaf18138
using macros ('rttype' and 'settt_') to access "private" field 'tt_'
2015-06-09 11:21:42 -03:00
Roberto Ierusalimschy
cbef15f3ea
comment (FALLTHROUGH position)
2015-06-09 11:21:13 -03:00
Roberto Ierusalimschy
16e8bb360b
comment
2015-06-09 11:21:00 -03:00
Roberto Ierusalimschy
6628012e9e
new release number (5.3.1)
2015-06-03 10:03:38 -03:00
Roberto Ierusalimschy
ed1fe28bb8
When comparing integers with floats, use float as common type when
...
possible (i.e., when integer fits in a float without losses); seems
to be more efficient in architectures with native support for used
Lua numbers
2015-06-02 16:11:24 -03:00
Roberto Ierusalimschy
6645bb2df4
'strcache' elements as arrays of 1 element hints that cache can
...
be n-way (instead of direct mapped)
2015-06-01 13:34:37 -03:00
Roberto Ierusalimschy
02aed045de
bug: return hook may not see correct values for active local variables
...
when function returns
2015-05-22 16:32:42 -03:00
Roberto Ierusalimschy
72bd2ef6c5
dependencies updated
2015-05-22 16:29:43 -03:00
Roberto Ierusalimschy
d39bb51faa
bug: interpreter cannot pop activation frame before calling return
...
hook (as it may want to access local variables active by the end
of the function)
2015-05-22 14:48:19 -03:00
Roberto Ierusalimschy
6142e663e4
reuse of 'addinfo' by lexical errors
2015-05-22 14:45:56 -03:00
Roberto Ierusalimschy
6dc20ff293
'l <= r' for numbers has its own function, instead of using
...
'not (r < l)' (seems to be slightly more efficient)
2015-05-20 15:19:11 -03:00
Roberto Ierusalimschy
99391e24ea
new configuration macro 'l_mathlim' (simplifies some dependencies
...
on float type)
2015-05-20 14:39:23 -03:00
Roberto Ierusalimschy
0ec12c1bd1
new semantics for numerical order (following math regardless
...
representation)
2015-05-20 13:22:55 -03:00
Roberto Ierusalimschy
a71c0ab861
detail (removed useless '#include')
2015-05-20 13:22:30 -03:00
Roberto Ierusalimschy
04ba6ea83b
new semantics for equality int-float
2015-04-29 15:27:16 -03:00
Roberto Ierusalimschy
a1935b9cba
error message ("too complex" -> "too many registers") + MAXREGS
...
changed to 255 (no reason not to use maximum allowed)
2015-04-29 15:24:11 -03:00
Roberto Ierusalimschy
513c639bf9
patch for last bug corrected to be against last released version
...
(and not against last version in RCS...)
2015-04-13 13:13:25 -03:00
Roberto Ierusalimschy
69b5f7a410
some details in 'luaO_int2fb' + more consistent use of the locale
...
decimal point
2015-04-11 15:30:08 -03:00
Roberto Ierusalimschy
ae76c39712
Bug: suspended '__le' metamethod can give wrong result
2015-04-10 14:56:25 -03:00
Roberto Ierusalimschy
0d4a1f71db
re-organization of initial configuration options
2015-04-10 14:41:04 -03:00
Roberto Ierusalimschy
67bf789462
avoid using API functions inside the core
2015-04-06 09:23:48 -03:00
Roberto Ierusalimschy
48d0674c2e
more consistent use of locale radix character across Lua
2015-04-03 15:41:57 -03:00
Roberto Ierusalimschy
6ffe006f5c
detail (removed unused macro VARBITS)
2015-04-02 18:10:53 -03:00
Roberto Ierusalimschy
4998e852ec
new function 'log2' to test 'luaO_ceillog2' (if needed)
2015-04-02 18:10:21 -03:00
Roberto Ierusalimschy
65ac789565
detail (comment)
2015-04-02 18:09:51 -03:00
Roberto Ierusalimschy
cfc84c856d
'LUA_REAL_*' -> 'LUA_FLOAT_*' (everywhere else we are using 'float')
2015-03-31 09:00:07 -03:00
Roberto Ierusalimschy
63720a4290
janitor work (comments, variable names, some other details)
2015-03-30 16:51:00 -03:00
Roberto Ierusalimschy
484bf14a6b
calls to 'luaC_checkGC' in luaD_precall moved near to 'luaD_checkstack'
...
(which is what can need memory)
2015-03-30 13:05:23 -03:00
Roberto Ierusalimschy
abb2f5511d
detail ('b + base' -> 'base + b' to follow all other similar uses)
2015-03-30 12:45:01 -03:00
Roberto Ierusalimschy
fcc6e1220e
avoid expression with side effect (in debug mode) inside 'sizeof'
2015-03-30 12:43:51 -03:00
Roberto Ierusalimschy
3a91274547
details (avoid 'lint' warnings)
2015-03-30 12:42:59 -03:00
Roberto Ierusalimschy
f2a813ae10
details (avoid some 'lint' warnings)
2015-03-28 16:16:55 -03:00
Roberto Ierusalimschy
e723c75c02
details (avoid 'lint' warnings)
2015-03-28 16:14:47 -03:00
Roberto Ierusalimschy
b436ed58a3
'clearapihash' -> 'luaS_clearcache' and moved to 'lstring.c' (which
...
keeps all code related to this cache)
2015-03-25 10:42:19 -03:00
Roberto Ierusalimschy
2b37f2150e
comments
2015-03-14 14:58:57 -03:00
Roberto Ierusalimschy
331632e8d8
code detail ('if' -> '?:')
2015-03-13 13:24:50 -03:00
Roberto Ierusalimschy
7d930ec694
use 'log2' when available
2015-03-12 11:04:04 -03:00
Roberto Ierusalimschy
0cf3b6495a
'ci_func' don't need to be exported
2015-03-11 13:10:41 -03:00
Roberto Ierusalimschy
b66fedadae
'lua_pushliteral' implemented with 'lua_pushstring' (to take
...
advantage of the cache)
2015-03-10 11:17:51 -03:00
Roberto Ierusalimschy
fd6e680e21
detail
2015-03-10 11:15:06 -03:00
Roberto Ierusalimschy
57c0db219b
line history keep lines without added 'return'
2015-03-09 18:57:05 -03:00
Roberto Ierusalimschy
4ba0cb4580
always use macros to operate on lua_Numbers
2015-03-07 16:30:16 -03:00
Roberto Ierusalimschy
a30c66f0fc
macro 'luai_apicheck'/'api_check' back with a 'lua_State' parameter
...
(some people use it)
2015-03-06 16:49:50 -03:00
Roberto Ierusalimschy
bb4baa73ea
allocation function is not exactly API (and cannot raise errors
...
like other API functions); better not use 'api_check' for cheking it.
2015-03-06 16:45:54 -03:00
Roberto Ierusalimschy
d7d44b038d
detail (use 'lua_pushliteral' to push an empty string)
2015-03-06 16:09:08 -03:00
Roberto Ierusalimschy
297512b34c
avoid using 'lua_pushliteral' in a non-zero-terminated string
2015-03-05 13:07:46 -03:00
Roberto Ierusalimschy
2ae2e6408e
avoid testing for NULL when marking objects that cannot be NULL
2015-03-04 10:51:55 -03:00
Roberto Ierusalimschy
a80cada914
new cache for interning strings
2015-03-04 10:31:21 -03:00
Roberto Ierusalimschy
a00013c8d0
'point2int' -> 'point2uint' (to reflect its actual result type)
2015-03-03 16:53:13 -03:00
Roberto Ierusalimschy
b9a1f27250
do not attempt emergency collection while building state (it is
...
useless, and state can be inconsistent)
2015-03-03 15:18:29 -03:00
Roberto Ierusalimschy
29aed28802
detail (use 'luaS_newliteral' when possible)
2015-03-03 15:17:04 -03:00
Roberto Ierusalimschy
951b562cf8
configuration for numerical types through only one #define for
...
each type
2015-03-02 13:59:01 -03:00
Roberto Ierusalimschy
6408bc0b7f
new macros 'chgfltvalue'/'chgivalue' (numerical for loop does
...
not need to set the type of its internal variable at each iteration)
2015-03-02 13:04:52 -03:00
Roberto Ierusalimschy
91efb4b895
LUA_COMPAT_5_1 needs some options deprecated from 5.2 to 5.3
2015-02-28 16:22:31 -03:00
Roberto Ierusalimschy
27c5b1b237
added patches to two bugs
2015-02-23 16:20:43 -03:00
Roberto Ierusalimschy
d51bdc166d
bug: 'string.format("%f")' can cause a buffer overflow (with long doubles)
...
bug: 'debug.getlocal' on a coroutine suspended in a hook can crash
the interpreter
2015-02-20 16:21:29 -02:00
Roberto Ierusalimschy
81245b1ad5
'numisinteger' (for table keys) replaced by 'luaV_tointeger' (old
...
'tointeger_aux'), which can do the same job.
2015-02-20 12:27:53 -02:00
Roberto Ierusalimschy
397ce11996
make 'hashfloat' configurable
2015-02-20 12:05:01 -02:00
Roberto Ierusalimschy
97f2aa5a44
bug: when manipulating other threads, there is no garanties about
...
their stack space
2015-02-19 15:06:21 -02:00
Roberto Ierusalimschy
419e2cb01d
detail (file does not need 'string.h')
2015-02-16 11:15:00 -02:00
Roberto Ierusalimschy
374f6c4612
detail ('fopen' needs 'stdio.h')
2015-02-16 11:14:33 -02:00
Roberto Ierusalimschy
4bdf9962bf
bug: suspended function can have its 'func' field not pointing to
...
its function, crashing debug functions
2015-02-13 14:01:17 -02:00
Roberto Ierusalimschy
e0306e386f
some changes in 'hashfloat' to avoid undefined (in ISO C) numerical
...
conversions
2015-02-13 11:05:34 -02:00
Roberto Ierusalimschy
2e6e53c7cc
added API checks to some unprotected 'top' increments
2015-02-11 16:47:22 -02:00
Roberto Ierusalimschy
2a57d2346e
detail
2015-02-09 16:05:46 -02:00
Roberto Ierusalimschy
7e425be975
bug (in 5.2): Chunk with too many lines can seg. fault
2015-02-09 15:57:45 -02:00
Roberto Ierusalimschy
0705e7b39f
detail (no need to write 'double' in source)
2015-02-09 15:41:54 -02:00
Roberto Ierusalimschy
4ccc4578b3
detail (use 'l_floor' instead of 'l_mathop(floor)')
2015-02-09 13:41:56 -02:00
Roberto Ierusalimschy
5e8c162b6c
detail
2015-02-05 15:50:24 -02:00
Roberto Ierusalimschy
c8d6cb0136
macros 'luai_num*' (for float arithmetic operations) moved to
...
llimits.h.
2015-02-05 15:15:33 -02:00
Roberto Ierusalimschy
0edcdf49c0
added comments documenting LUA_NOCVTN2S/LUA_NOCVTS2N
2015-02-05 14:53:34 -02:00
Roberto Ierusalimschy
b7dfd18612
make buffer for format specification a little larger (length modifier
...
can be larger than 2, e.g. "I64")
2015-02-04 10:54:31 -02:00
Roberto Ierusalimschy
8efcd411fe
own implementation for 'string.format("%a")' for C89 platforms
2015-02-04 10:52:57 -02:00
Roberto Ierusalimschy
90d016980f
detail ('luaL_getmetatable' does not return a boolean, but a tag)
2015-02-03 15:38:24 -02:00
Roberto Ierusalimschy
b3996c55f6
LUAL_BUFFERSIZE affects the API, so it is better not to change it
...
between releases of the same version. (The long double case seems
to be too rare, so that should not be a problem; moreover, that
case is related to a bug)
2015-01-16 15:26:56 -02:00
Roberto Ierusalimschy
438a9fcc78
LUAI_MAXSHORTLEN moved from 'luaconf.h' to 'llimits.h' (does not
...
affect the API and is seldom modified)
2015-01-16 15:15:52 -02:00
Roberto Ierusalimschy
7e2015a46d
size of short strings stored in a single byte, to reduce the size
...
of struct 'TString'
2015-01-16 14:54:37 -02:00
Roberto Ierusalimschy
5b01cb39b5
larger MINSTRTABSIZE (standard Lua starts with ~230 strings, after
...
oppening the standard libraries)
2015-01-16 13:41:03 -02:00
Roberto Ierusalimschy
a0503305bd
comments
2015-01-16 11:26:55 -02:00
Roberto Ierusalimschy
965f74525b
removed macro LUAI_FIRSTPSEUDOIDX (that stuff does not need
...
to be configurable)
2015-01-13 17:50:30 -02:00
Roberto Ierusalimschy
3f2e21f0ea
Long double needs a larger LUAL_BUFFERSIZE (because
...
'string.format("%.99f", 1e4900)' can generate quite long strings),
but otherwise buffer can be 1~2K
2015-01-13 15:24:22 -02:00
Roberto Ierusalimschy
3509914916
BUG (when compiled with long double): buffer overflow when formatting
...
string.format("%.99f", 1e4930)
2015-01-13 15:18:25 -02:00
Roberto Ierusalimschy
ae27be40c9
better check for overflows in 'table.move' (removes restriction that
...
initial position should be positive)
2015-01-13 14:27:29 -02:00
Roberto Ierusalimschy
cdd26700e8
definition for 'MAXUPVAL' moved for a more "private" place and its
...
value and comment corrected to reflect current implementation
2015-01-13 13:49:11 -02:00
Roberto Ierusalimschy
a9a4bf68b0
typo in comment
2015-01-13 11:18:04 -02:00
Roberto Ierusalimschy
f31cc8e342
typo in error message
2015-01-12 17:32:32 -02:00
Roberto Ierusalimschy
3c55790ebe
'setkey' -> 'setnodekey' (to avoid conflicts with POSIX)
2015-01-05 11:52:37 -02:00
Roberto Ierusalimschy
0adfa773b9
new macro 'cast_func' adds '__extension__' (in gnu compilers) when
...
converting void* to function, to avoid warnings
2015-01-05 11:51:39 -02:00
Roberto Ierusalimschy
3317f5c6d9
includes 'stddef.h' (as it uses NULL)
2015-01-05 11:48:33 -02:00
Roberto Ierusalimschy
dbf911c516
detail (added -Wconversion as a comment, to be used ocasionally)
2015-01-02 11:03:52 -02:00
Roberto Ierusalimschy
3a29087cb7
'lua_setlocal' should not pop value when failing (to be consistent
...
with the manual and with 'lua_setupvalue')
2015-01-02 10:52:22 -02:00
Roberto Ierusalimschy
234fb7f695
clearer(?) code (also avoids a warning about 'c' being used
...
without initialization)
2015-01-02 10:50:28 -02:00
Roberto Ierusalimschy
c077d47465
does not define _XOPEN_SOURCE when LUA_USE_C89 is defined + defining
...
_XOPEN_SOURCE==0 undefines that macro
2014-12-29 14:54:13 -02:00
Roberto Ierusalimschy
8e5290d81e
all "divisions" (div,idiv,mod) by zero are not folded, to avoid
...
problems during compilation + does not fold zero results, as they
can collapse with -0.0 and the ANSI test to distinguish both needs
a division by zero (which we are trying to avoid) + removed macro
'luai_numinvalidop' (as its main use case were divisions by zero)
2014-12-29 14:49:25 -02:00
Roberto Ierusalimschy
a1c37f834a
detail (macro 'luai_numidiv' uses 'luai_numdiv' to compute the division)
2014-12-29 11:27:55 -02:00
Roberto Ierusalimschy
1a7868c1d5
bug: 'random' limit is 2^31-1, not RAND_MAX
2014-12-27 18:32:26 -02:00
Roberto Ierusalimschy
de3933480e
details
2014-12-27 18:31:43 -02:00
Roberto Ierusalimschy
50e2eb8954
change in macro 'vmcase', avoding code inside it. (Code inside the
...
macro harms tools such as debuggers.)
2014-12-27 18:30:38 -02:00
Roberto Ierusalimschy
94eb37dc73
new year (2015)
2014-12-26 15:24:27 -02:00
Roberto Ierusalimschy
900bdd5761
detail (to avoid warnings)
2014-12-26 12:46:07 -02:00
Roberto Ierusalimschy
a51069202a
removed macro 'luai_numinvalidop' (main motivation removed, as folding
...
does not handle any division by zero by default)
2014-12-26 12:44:44 -02:00
Roberto Ierusalimschy
fb6796ba06
removed useless initializations
2014-12-26 12:43:45 -02:00
Roberto Ierusalimschy
88ef06f4f3
comments were wrong (not updated about several changes)
2014-12-20 11:58:15 -02:00
Roberto Ierusalimschy
eb45f3a9b6
details in 'luaM_reallocvchar'
2014-12-19 15:26:14 -02:00
Roberto Ierusalimschy
6321041058
new macro 'luaM_reallocvchar' to allocate arrays of chars (avoids
...
uneeded tests and respective warnings)
2014-12-19 11:45:40 -02:00
Roberto Ierusalimschy
2b83711fba
new macro 'nvalue' (to convert an object to a float when we know
...
object is a number)
2014-12-19 11:36:32 -02:00
Roberto Ierusalimschy
3ae21a352c
detail (in test for 'luai_numinvalidop', use a round float)
2014-12-19 11:33:06 -02:00
Roberto Ierusalimschy
570143bf88
comment
2014-12-19 11:31:12 -02:00
Roberto Ierusalimschy
1465edf341
old Visual Studio versions did not support 'noreturn' attribute
2014-12-19 11:30:23 -02:00
Roberto Ierusalimschy
77e786d436
stupid bug in T.stacklevel (not in use by the tests)
2014-12-18 10:13:42 -02:00
Roberto Ierusalimschy
6d79752e65
Windows uses 'long long' (instead of '__int64') when present; again,
...
uses macro LLONG_MAX as a proxy for the support for 'long long'.
2014-12-16 15:17:30 -02:00
Roberto Ierusalimschy
75812a517b
added macro LUA_USE_I64 for separate control of use of Windows-specific
...
types
2014-12-16 14:20:01 -02:00
Roberto Ierusalimschy
151dc5cc5f
traverse loaded modules (instead of globals) for a name for a function +
...
removes prefix '_G.' from names (if present)
2014-12-14 16:32:26 -02:00
Roberto Ierusalimschy
0b6cfea005
comments
2014-12-13 15:57:00 -02:00
Roberto Ierusalimschy
c8da3fbc35
in traceback names, give preference to 'name' over '_G.name'
2014-12-13 15:47:58 -02:00
Roberto Ierusalimschy
c96cd1c647
reinsertion-control macro renamed: lconfig_h -> luaconf_h
2014-12-12 09:49:32 -02:00
Roberto Ierusalimschy
57e91b4159
correct computation for limit in 'getnum'
2014-12-11 12:03:07 -02:00
Roberto Ierusalimschy
ef7d29c666
better limits for 'sting.rep' and 'string.packsize'
2014-12-11 11:40:40 -02:00
Roberto Ierusalimschy
81ecaf6178
new specifiers in 'strftime' are defined in C99 (not Posix)
2014-12-10 13:42:42 -02:00
Roberto Ierusalimschy
27ab59bc16
'ipairs' needs an argument
2014-12-10 10:26:42 -02:00
Roberto Ierusalimschy
bd8ce7e331
macro 'LUA_C89_NUMBERS' makes a little easier to use C89 numerical types
2014-12-10 09:56:55 -02:00
Roberto Ierusalimschy
5c519a69d3
new function 'string.packsize'
2014-12-10 09:36:03 -02:00
Roberto Ierusalimschy
6f54b07663
give preference to global names in tracebacks
2014-12-10 09:31:32 -02:00
Roberto Ierusalimschy
741ad97e92
new parameter for testC instruction 'pcall' (error handler)
2014-12-10 09:30:51 -02:00
Roberto Ierusalimschy
b4633c586b
error handler does not need to be a function (can be a callable
...
object)
2014-12-10 09:30:09 -02:00
Roberto Ierusalimschy
5fae2a5b05
redefinition of LUAI_MAXSTACK to make stack-overflow tests run faster
2014-12-09 15:17:40 -02:00
Roberto Ierusalimschy
36efa6a6b9
no more 'preloadedlibs' when opening libraries (as it is dead code now)
2014-12-09 13:00:17 -02:00
Roberto Ierusalimschy
c6e74e41c9
handle case where function was called as a hook
2014-12-08 13:48:23 -02:00
Roberto Ierusalimschy
6909b5a2b4
In 'debug.gethook', does not query hook table (which may not exist) if
...
there is no hook set
2014-12-08 13:47:25 -02:00
Roberto Ierusalimschy
594d7266af
'assert' checks that it has (at least) one parameter + 'assert' ensures
...
it passes only one value to 'error'
2014-12-08 13:26:55 -02:00
Roberto Ierusalimschy
ab4a890d04
use 'namewhat' when building a traceback
2014-12-08 13:26:09 -02:00
Roberto Ierusalimschy
64e25a6186
avoid octal numerals
2014-12-08 13:12:07 -02:00
Roberto Ierusalimschy
460968353f
in test mode, debug library is not predefined (to allow testing
...
'preloadedlibs')
2014-12-06 18:42:58 -02:00
Roberto Ierusalimschy
32a1f54b9a
no more default size for option 'c' in pack/unpack
2014-12-04 14:25:40 -02:00
Roberto Ierusalimschy
6df197ec15
some functions from test module must be exported
2014-11-29 17:45:37 -02:00
Roberto Ierusalimschy
177807f21e
casts ('(int)' -> 'cast_int')
2014-11-29 15:38:33 -02:00
Roberto Ierusalimschy
92f02fff11
bug: lua_tounsignedx must cast to lua_Unsigned (of course...)
2014-11-29 15:24:05 -02:00
Roberto Ierusalimschy
125296c83d
next release won't be beta
2014-11-28 17:13:39 -02:00
Roberto Ierusalimschy
9c41d9d1df
removed unneeded barrier ('from' must be white)
2014-11-27 16:41:43 -02:00
Roberto Ierusalimschy
ad79eafe86
details (comments)
2014-11-25 16:21:57 -02:00
Roberto Ierusalimschy
fd179ab4b8
clearer notation for "compare" instruction
2014-11-25 12:51:33 -02:00
Roberto Ierusalimschy
bf163ea7f0
bug (' #3 ' causes seg. fault in 5.3-beta) + comments + 'codearith' ->
...
'codeexpval' (confusion about what operations function accept was
one of the reasons for the bug)
2014-11-24 12:59:22 -02:00
Roberto Ierusalimschy
075661ffde
new test for macro 'luai_numinvalidop'
2014-11-24 12:56:56 -02:00
Roberto Ierusalimschy
db5ac2fa0d
detail (buffer in 'LoadF' is related to files)
2014-11-21 10:17:58 -02:00
Roberto Ierusalimschy
1735c05ac7
avoid memory errors while a file is locked (when reading a line)
2014-11-21 10:17:33 -02:00
Roberto Ierusalimschy
5fbd40dbe5
'x//y' extended to floats
2014-11-21 10:15:57 -02:00
Roberto Ierusalimschy
049cf14cf9
'x//y' extended to floats + more comments about module and floor
...
division operations
2014-11-21 10:15:00 -02:00
Roberto Ierusalimschy
5d628519d3
simpler definition for 'luaV_tonumber_'
2014-11-19 13:05:15 -02:00
Roberto Ierusalimschy
244646bdf7
detail (LUAL_BUFFERSIZE has a larger variation among different
...
platforms)
2014-11-19 13:00:42 -02:00
Roberto Ierusalimschy
5bdfefd3a5
allows calling luaL_checkstack with no message (in runC)
2014-11-14 16:15:17 -02:00
Roberto Ierusalimschy
5873786e27
small bug (error of "chunk has too many lines" might use 't.token'
...
before reading the first token)
2014-11-14 14:06:09 -02:00
Roberto Ierusalimschy
cb59019f58
uses return value from luaL_getmetatable
2014-11-12 11:32:27 -02:00
Roberto Ierusalimschy
52c0f9575b
uses return value from lua_getfield
2014-11-12 11:31:51 -02:00
Roberto Ierusalimschy
4fde357130
details (matching parameter names with manual)
2014-11-12 11:30:15 -02:00
Roberto Ierusalimschy
e5fd1e5fe2
details (match parameter names with lua.h and manual)
2014-11-12 11:28:54 -02:00
Roberto Ierusalimschy
87b179e71d
detail (use new returned value from 'lua_getglobal' )
2014-11-11 17:41:27 -02:00
Roberto Ierusalimschy
b401d37188
detail (to avoid a "to avoid warnings" return)
2014-11-11 17:40:20 -02:00
Roberto Ierusalimschy
6624ccff26
independent code for 'printstack' + test for panic function can
...
ran code there
2014-11-11 15:15:06 -02:00
Roberto Ierusalimschy
9a38c08011
no need to ensure any stack space for panic function + some changes
...
in 'tryfuncTM' (small simplification)
2014-11-11 15:13:39 -02:00
Roberto Ierusalimschy
be87789a6c
details
2014-11-11 15:08:19 -02:00
Roberto Ierusalimschy
d1d1ddec1e
details
2014-11-10 16:41:19 -02:00
Roberto Ierusalimschy
bfa0898312
bug: memory error in panic mode does not push error message on
...
the stack + stack check in tryfuncTM + comments
2014-11-10 15:42:04 -02:00
Roberto Ierusalimschy
79b0d05480
new function 'T.checkpanic' (to check panic errors)
2014-11-10 15:41:36 -02:00
Roberto Ierusalimschy
779381fe9e
detail (comment)
2014-11-10 15:24:43 -02:00
Roberto Ierusalimschy
b6911c177d
luaL_loadbuffer replaced by luaL_loadstring (to test luaL_loadstring)
...
+ 'rawgetp'/'rawsetp' added to C interpreter
2014-11-10 12:47:29 -02:00
Roberto Ierusalimschy
9212175ffb
added missing cases for debug info about tag methods +
...
better error message for bitwise operators
2014-11-10 12:46:46 -02:00
Roberto Ierusalimschy
ad20689feb
better error message for bitwise operators (they are not arithmetic...)
2014-11-10 12:46:05 -02:00
Roberto Ierusalimschy
e320790154
using address instead of string for key for table 'CLIBS' in the
...
registry
2014-11-10 12:28:31 -02:00
Roberto Ierusalimschy
fee3aa518d
using address key (light userdata) for hook table, instead of
...
string
2014-11-10 12:27:16 -02:00
Roberto Ierusalimschy
b58602d93d
removed unneeded test (result of b_str2int is already checked
...
against length)
2014-11-10 12:25:52 -02:00
Roberto Ierusalimschy
74e10b9c3b
details (error messages)
2014-11-08 16:12:53 -02:00
Roberto Ierusalimschy
b044b8c182
detail (line break)
2014-11-08 15:57:08 -02:00
Roberto Ierusalimschy
a113e1498d
when checking thread consistency, check its entire stack (always
...
the entire stack must have valid values)
2014-11-07 16:07:17 -02:00
Roberto Ierusalimschy
17ca3b1763
cleaner test for overflow for range of 'math.random'
2014-11-07 09:31:58 -02:00
Roberto Ierusalimschy
50b18f60cb
detail
2014-11-05 16:55:43 -02:00
Roberto Ierusalimschy
ad73e5156e
more direct way to fill sign-extension extra bytes when packing
...
integers with sizes larger than lua_Integer + added comments
2014-11-05 16:50:29 -02:00
Roberto Ierusalimschy
720c68dabb
removed repeated flags (-Wall/-Wdisabled-optimization) + removed flag
...
-Wcast-align (Lua does some unconventional casts) + added flag -std=c99
+ added file lprefix.h in dependency lists
2014-11-05 11:02:26 -02:00
Roberto Ierusalimschy
81c39a5244
no need to cast '*s' to unsigned char when we know it is a digit +
...
no need to call 'luaO_hexavalue' for decimal digits
2014-11-04 17:16:25 -02:00
Roberto Ierusalimschy
cfabcbfb17
added macro for configuring padding value in 'string.pack'
2014-11-04 12:34:43 -02:00
Roberto Ierusalimschy
bde14c3adc
macro to change method of conversion from float to integer (make it
...
use floor intead of requiring an exact integral value)
2014-11-03 18:07:47 -02:00
Roberto Ierusalimschy
4b839d7c72
Definitions for Lua code that must come before any other header file
2014-11-03 13:12:44 -02:00
Roberto Ierusalimschy
c49edc4566
keep "#include <windows.h>" in this file, but without the
...
previous requirement that it must be included before any other
header file (it doesn't seem to matter)
2014-11-03 13:11:10 -02:00
Roberto Ierusalimschy
c5d52a5468
Windows uses "LONGLONG" option, even not having long long (it has __int64)
2014-11-02 17:35:39 -02:00
Roberto Ierusalimschy
e75c0148c3
comments (references to "ANSI C" changed to "ISO C", which is the
...
international name
2014-11-02 17:33:33 -02:00
Roberto Ierusalimschy
28fdbcf393
added include for 'lprefix.h', for stuff that must be added before
...
any other header file
2014-11-02 17:19:04 -02:00
Roberto Ierusalimschy
c25072a246
'lua_load' sets _ENV for any chunk with upvalues (not just those
...
with exactly one upvalue)
2014-10-31 15:41:51 -02:00
Roberto Ierusalimschy
1a69a3ecea
LUA_WIN -> LUA_USE_WINDOWS
2014-10-31 13:54:06 -02:00
Roberto Ierusalimschy
dcfc3c9405
new option '=' (native endian) for pack/unpack
2014-10-31 13:53:31 -02:00
Roberto Ierusalimschy
4542fb9f78
comments (a few extra quotes around identifiers)
2014-10-30 16:53:28 -02:00
Roberto Ierusalimschy
80e817719d
default changed from C89 to C99 + extra tests before using C99
...
features (when possible) + LUA_32BITS use 'int' when possible
('long' can be 64 bits)
2014-10-30 16:50:03 -02:00
Roberto Ierusalimschy
96f3a31b24
Better organization of definitions in categories + removed
...
'_CRT_SECURE_NO_WARNINGS' (useless there) + LUA_ENV/luai_writestring/
luai_writeline/luai_writestringerror/LUA_INT32/LUAI_UMEM/LUAI_MEM
moved to other places (no need to be in luaconf.h) + changed definition
for LUAL_BUFFERSIZE
2014-10-29 16:01:26 -02:00
Roberto Ierusalimschy
ff6c034330
configurations for types 'lu_mem'/'l_mem'/'Instruction' moved to here
...
(from 'luaconf.h'), as they are not needed by the API and probably
will not be changed
2014-10-29 15:07:45 -02:00
Roberto Ierusalimschy
05afee0f50
definitions for 'luai_writestring'/'luai_writeline'/'luai_writestringerror'
...
moved to 'lauxlib.h' (they do not need to be stable or configurable) +
prefixes changed from 'luai_' to 'lua_' (they are not part of the core)
2014-10-29 14:12:30 -02:00
Roberto Ierusalimschy
351a446ec5
definition for 'LUA_ENV' moved from 'luaconf.h' to here (no need to
...
be visible outside Lua + no need for easy redefinitions)
2014-10-29 13:38:24 -02:00
Roberto Ierusalimschy
e9885efc7c
added comment and assert about an (impossible) division by zero
2014-10-29 13:02:53 -02:00
Roberto Ierusalimschy
59fbbf0a65
small simplifications in code for 'lua_strx2number'
2014-10-28 16:41:38 -02:00
Roberto Ierusalimschy
61c3c80177
detail
2014-10-28 16:23:31 -02:00
Roberto Ierusalimschy
9de384e27a
removed useless 'include math.h'
2014-10-28 15:27:50 -02:00
Roberto Ierusalimschy
4b526045fa
comment
2014-10-28 15:27:41 -02:00
Roberto Ierusalimschy
4870194380
small reorganization of tests around LUA_USE_C99
2014-10-27 17:21:56 -02:00
Roberto Ierusalimschy
41d0e66184
comments + Windows numeric types not used if LUA_ANSI is defined
2014-10-27 16:06:03 -02:00
Roberto Ierusalimschy
aa1bd8876c
comments
2014-10-27 16:05:37 -02:00
Roberto Ierusalimschy
7314acaa80
'T.limits' reports some more useful limits
2014-10-27 15:00:02 -02:00
Roberto Ierusalimschy
4b2521cd9e
better (and safer?) way to test native size of type 'int'
2014-10-27 14:59:31 -02:00
Roberto Ierusalimschy
491103708e
'MAXSTACK' -> 'MAXREGS' and moved to 'lcode.c' (there is no reason
...
to change that constant...)
2014-10-27 14:29:58 -02:00
Roberto Ierusalimschy
fa4d5c8689
pack/unpack do not handle final '\0' as an "option" (it streches
...
unnecessarily the switch range)
2014-10-27 11:30:24 -02:00
Roberto Ierusalimschy
aef2d711b1
detail
2014-10-26 13:45:41 -02:00
Roberto Ierusalimschy
bdf566a8a3
`name' in comments changed to 'name'
2014-10-25 09:50:46 -02:00
Roberto Ierusalimschy
c3c78030f7
avoid redeclaration of _CRT_SECURE_NO_WARNINGS + 'lua_numtointeger' ->
...
'lua_numbertointeger'
2014-10-24 09:42:47 -02:00
Roberto Ierusalimschy
ff9ca88aa6
added some casts to avoid warnings in some compilers
2014-10-24 09:42:29 -02:00
Roberto Ierusalimschy
463edee2fd
'lua_numtointeger' -> 'lua_numbertointeger'
2014-10-24 09:42:06 -02:00
Roberto Ierusalimschy
88ff582fd8
detail (using 'sizeof' instead of 'strlen' for length of a constant
...
string)
2014-10-22 14:55:57 -02:00
Roberto Ierusalimschy
6b12b82532
added 'l_' prefix for names that can be redefined externally
2014-10-22 09:44:20 -02:00
Roberto Ierusalimschy
d7a0179cd6
use 'opf' (float) variants only when explicitly allowed (LUA_USE_C99)
2014-10-21 12:38:46 -02:00
Roberto Ierusalimschy
6d613817d4
comments
2014-10-20 20:21:05 -02:00
Roberto Ierusalimschy
b8d412aa07
error in comment
2014-10-20 16:29:55 -02:00
Roberto Ierusalimschy
961760c9b6
message handler always adds a traceback to messages (even if they
...
are not strings), unless they have a __tostring method.
2014-10-20 16:19:26 -02:00
Roberto Ierusalimschy
57559547a3
in 'pack'/'unpack', endianness and alignment treated like options +
...
small changes in names and handling of internal options ('KOption')
2014-10-20 14:44:54 -02:00
Roberto Ierusalimschy
cfa84e1232
does not use 'long long' when LUA_ANSI is set
2014-10-20 14:32:05 -02:00
Roberto Ierusalimschy
0d31efb365
'lua_stringtonum' -> 'lua_stringtonumber'
2014-10-17 16:17:55 -03:00
Roberto Ierusalimschy
f97c64d7bf
macros 'LUA_QL'/'LUA_QL' deprecated
2014-10-17 13:28:21 -03:00
Roberto Ierusalimschy
ea3155e380
'debug.sizeof' removed
2014-10-17 08:07:26 -03:00
Roberto Ierusalimschy
c172a4f7c2
'dumpint' and related functions replaced by 'string.pack'/'string.unpack'
2014-10-17 07:55:28 -03:00
Roberto Ierusalimschy
f8e0d33b25
added "_CRT_SECURE_NO_WARNINGS" for Windows (to avoid warnings about
...
several standard C functions) + small changes in '#include's
2014-10-15 11:53:20 -03:00
Roberto Ierusalimschy
745618d941
'charpatt' -> 'charpattern'
2014-10-15 11:31:10 -03:00
Roberto Ierusalimschy
89602bf747
'lua_strtonum' -> 'lua_stringtonum'
2014-10-15 11:27:40 -03:00
Roberto Ierusalimschy
56d4537879
'$c' in 'lua_pushfstring' prints non-printable characters with
...
their codes
2014-10-10 19:23:04 -03:00
Roberto Ierusalimschy
18014ef2fd
better handling of systems that do not support 'long long'
2014-10-08 17:32:50 -03:00
Roberto Ierusalimschy
ffe7401ceb
avoid warnings in macro 'luaM_reallocv' + comments
2014-10-08 17:25:51 -03:00
Roberto Ierusalimschy
65ec3379b1
added some casts for the cases when lua_Number != double
2014-10-08 16:57:31 -03:00
Roberto Ierusalimschy
85fc9ecd5f
detail ('G(L)' -> 'g')
2014-10-08 09:20:26 -03:00
Roberto Ierusalimschy
2a21f6c894
'lua_Kcontext' -> 'lua_KContext'
2014-10-07 15:29:13 -03:00
Roberto Ierusalimschy
3670db99b6
comments
2014-10-06 18:34:34 -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
15f4150518
alpha -> beta
2014-10-04 19:57:36 -03:00
Roberto Ierusalimschy
c5cae9362c
added two casts to avoid warnings in VS
2014-10-04 19:57:10 -03:00
Roberto Ierusalimschy
4f4e0e49bb
easier way to compile Lua 32
2014-10-03 09:55:44 -03:00
Roberto Ierusalimschy
2f4d429071
details (comments)
2014-10-03 09:54:57 -03:00
Roberto Ierusalimschy
27f7bd2e83
detail
2014-10-01 13:05:06 -03:00
Roberto Ierusalimschy
798660c9cd
deprecated "cast macros" ('luaL_checkint', 'luaL_optint', etc.)
2014-10-01 08:54:56 -03:00
Roberto Ierusalimschy
34b6664dcb
better to use 'long' to represent UTF-8 code points
2014-10-01 08:52:33 -03:00
Roberto Ierusalimschy
d35fff16d5
'ipairs' always stops at first nil element
2014-09-30 10:53:26 -03:00
Roberto Ierusalimschy
56699cd603
small change to avoid bug in some versions of the clang compiler
2014-09-26 11:09:21 -03:00
Roberto Ierusalimschy
8ede2c353c
detail in 'report' + message handler always is called with an
...
argument + 'report' already handles non-string error messages
2014-09-25 11:20:37 -03:00
Roberto Ierusalimschy
6384475ec4
'luaL_getmetafield' returns type of metafield (instead of a boolean)
2014-09-22 03:42:15 -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
0a6b58c3aa
weak tables that must be retraversed are kept in 'grayagain' list
...
until atomic phase (instead of going to their special lists) +
more comments
2014-09-03 13:54:41 -03:00
Roberto Ierusalimschy
979a663d2a
detail (error message from 'coroutine.status')
2014-09-01 15:00:04 -03:00
Roberto Ierusalimschy
22952d8973
'T.gccolor' classify dead objects too
2014-09-01 14:58:55 -03:00
Roberto Ierusalimschy
df608f842a
'linktable' -> 'linkgclist' (and used for all links with 'gclist')
2014-09-01 14:37:11 -03:00
Roberto Ierusalimschy
001bb46ae1
bug: Ephemeron table can wrongly collect entry with strong key
2014-09-01 13:56:01 -03:00
Roberto Ierusalimschy
9b25347a67
detail
2014-08-27 11:59:33 -03:00
Roberto Ierusalimschy
e401513086
new option 'p' for 'debug.sizeof' (size of a pointer)
2014-08-22 13:22:42 -03:00
Roberto Ierusalimschy
7f1a2ad699
new functions 'lua_geti/lua_seti' (non raw)
2014-08-21 17:07:56 -03:00
Roberto Ierusalimschy
a1ab5ab396
'table.copy' -> 'table.move' + optional parameter moved to the end +
...
several functions operate on "virtual" tables too
2014-08-21 16:13:55 -03:00
Roberto Ierusalimschy
01549fb1ed
'Csize' -> 'sizeof' + removed its 'b' option
2014-08-21 16:12:40 -03:00
Roberto Ierusalimschy
4fba117433
[un]'dumpint' -> [un]'dumpinteger'
2014-08-20 19:06:41 -03:00
Roberto Ierusalimschy
2be88d5084
'lua_Ctx' -> 'lua_Kcontext'
2014-08-01 14:33:08 -03:00
Roberto Ierusalimschy
f5c690b684
details in comments
2014-08-01 14:24:02 -03:00
Roberto Ierusalimschy
61fa462535
added cast to avoid warning
2014-08-01 14:22:57 -03:00
Roberto Ierusalimschy
fba9050d3d
release changed to (5.3) alpha
2014-07-31 10:44:30 -03:00
Roberto Ierusalimschy
d861706620
new macro 'cvt2num' to better control whether strings are convertible
...
to numbers
2014-07-30 11:42:44 -03:00
Roberto Ierusalimschy
34ac039fb8
new macro 'cvt2str' to better control whether numbers are convertible
...
to strings
2014-07-30 11:00:14 -03:00
Roberto Ierusalimschy
1aa5262634
do not assume numbers are coercible to strings
2014-07-30 10:59:24 -03:00
Roberto Ierusalimschy
07c7fdb9df
simpler definition for 'setobj' (trust the compiler for the assignment)
2014-07-29 13:22:24 -03:00
Roberto Ierusalimschy
3ccbae84d2
added some casts between integral types (to avoid warnings)
2014-07-29 13:01:00 -03:00
Roberto Ierusalimschy
255d59ed5e
some janitorial work (comments, small refactoring)
2014-07-28 14:47:53 -03:00
Roberto Ierusalimschy
925d1b59f9
new function 'math.ult' (unsigned less than)
2014-07-28 14:35:47 -03:00
Roberto Ierusalimschy
03bbe1baf1
first implementation for 'table.copy'
2014-07-25 15:46:00 -03:00
Roberto Ierusalimschy
f9037ae8c1
'ipairs' respects metamethods
2014-07-24 16:33:29 -03:00
Roberto Ierusalimschy
57d8424146
extra space for new threads is initialized with a copy of the main
...
thread, not of the creator thread.
2014-07-24 13:17:56 -03:00
Roberto Ierusalimschy
baa0e23456
better support for extra user space associated with a Lua state
2014-07-24 11:00:16 -03:00
Roberto Ierusalimschy
55a710545c
detail (extra byte in LUAI_EXTRASPACE to test proper alignment of
...
a lua_State)
2014-07-23 14:16:50 -03:00
Roberto Ierusalimschy
753f2c1da4
better(?) alignment for some structures (pointers first)
2014-07-23 14:15:43 -03:00
Roberto Ierusalimschy
b3b8580606
comments + proper undef of compatibility macros + no need to undef
...
internal macros (this is the first definition)
2014-07-23 13:47:47 -03:00
Roberto Ierusalimschy
73ad16b5c6
no need for type 'pCallInfo'
2014-07-23 13:44:30 -03:00
Roberto Ierusalimschy
97e299c395
'lua_replace' implemented as a macro using 'lua_copy'
2014-07-22 15:07:47 -03:00
Roberto Ierusalimschy
c697aa30bc
more precise type for argument to 'aux_upvalue'
2014-07-21 13:02:57 -03:00
Roberto Ierusalimschy
17ee57f8e0
'iswhite' and related macros now can work directly on any object
...
(no need to convert to 'GCObject')
2014-07-21 13:02:10 -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
e43612aaf6
put the restriction that 'luaC_barrierback' works only on tables
...
in its prototype
2014-07-19 12:09:37 -03:00
Roberto Ierusalimschy
2898e2fd12
removed useless assertion (gcstate != GCSpause already implied by
...
other assertions) and wrong assertion (setmetatable uses this barrier
for tables too)
2014-07-19 11:44:19 -03:00
Roberto Ierusalimschy
8704fca0c9
in 'luaL_checkversion_' check numeric types first. (Other tests
...
depend on correct numeric type.)
2014-07-19 11:37:09 -03:00
Roberto Ierusalimschy
325e44d87e
no more "-2" for limits. (Limits should be precise; safety is in
...
the code that handles these limits.)
2014-07-18 15:29:12 -03:00
Roberto Ierusalimschy
54ac253343
detail (no need to define LUAI_USER_ALIGNMENT_T when it is not
...
defined; simpler to define 'L_Umaxalign' directly)
2014-07-18 15:18:45 -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
3511e186cd
ensure size for LUAI_USER_ALIGNMENT_T in tests is larger than the
...
structures it is aligning (in most architectures)
2014-07-18 10:27:45 -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
5a9cc57a5e
change in GCObject: instead of being a union, it is now a structure
...
with the common header of all collectable objects; union is used
only for conversions. (Goal is to be able to check that the cast
'obj2gco' can have a check to ensure that object being converted
is really a collectable object.). This is the first step in the
change.
2014-07-17 14:09:50 -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
8bb272a3e3
new conversion float->integer: conversion is valid only when
...
float has an exact representation as an integer
2014-07-17 09:30:53 -03:00
Roberto Ierusalimschy
c229ed597f
'requiref' checks 'package.loaded' before loading a module
2014-07-16 11:51:36 -03:00
Roberto Ierusalimschy
16b4110521
function 'type' keeps type names as upvalues to avoid creating strings
...
everytime it is called
2014-07-16 10:56:59 -03:00
Roberto Ierusalimschy
f14662fca6
detail (added placeholders for non-function fields to preallocate
...
space for them)
2014-07-16 10:56:14 -03:00
Roberto Ierusalimschy
a9af12bbe7
Table library now respects '__index'/'__newindex' metamethods
2014-07-16 09:44:52 -03:00
Roberto Ierusalimschy
5bbb4a06a6
removed unused parameter Ä'L' in macro 'api_check' and company
2014-07-15 18:26:50 -03:00
Roberto Ierusalimschy
d4fb848be7
added api check in 'lua_typename' (tag is valid)
2014-07-15 18:14:49 -03:00
Roberto Ierusalimschy
b9dcf9974d
detail (typos in comments)
2014-06-30 16:48:08 -03:00
Roberto Ierusalimschy
a77d263e86
unsigned-manipulation functions (lua_puhsunsigned, lua_tounsigned, etc.)
...
deprecated
2014-06-26 15:38:28 -03:00
Roberto Ierusalimschy
7cc40851e1
emergency collection can happen even when collector is stopped
2014-06-26 15:29:05 -03:00
Roberto Ierusalimschy
08a9c9faa3
detail (comment)
2014-06-26 15:28:24 -03:00
Roberto Ierusalimschy
84fe52dbeb
unsigned-manipulation functions (lua_puhsunsigned, lua_tounsigned, etc.)
...
deprecated
2014-06-26 14:25:11 -03:00
Roberto Ierusalimschy
10200585a7
var-arguments to the script come from 'arg' table (not from original
...
'argv' array)
2014-06-26 14:08:52 -03:00
Roberto Ierusalimschy
c94f11d783
'IntPoint' -> 'point2int' + ensure that casted value fits in
...
destination type
2014-06-26 13:17:35 -03:00
Roberto Ierusalimschy
54ac5960a8
LUA_MAXUNSIGNED was only used to define 2.0^intnumbits (and that
...
definition was not strictly portable), so it was removed and
replaced by a more correct and direct definition for 2.0^intnumbits
(only where it was needed)
2014-06-24 14:02:00 -03:00
Roberto Ierusalimschy
0e6229a953
use proper macros to convert 'GCObject' to other objects + better
...
type cheking in 'set*value' macros
2014-06-19 15:39:36 -03:00
Roberto Ierusalimschy
d2ab1aef31
detail (avoid too large macro)
2014-06-19 15:29:30 -03:00
Roberto Ierusalimschy
89b56e7d84
more precision between closure types ('LClosure' x 'CClosure')
2014-06-19 15:27:20 -03:00
Roberto Ierusalimschy
14929f5764
use appropriate macros to convert GCObject to specific types
2014-06-18 19:59:29 -03:00
Roberto Ierusalimschy
7021cc9bc8
allows different 'source' for each prototype, but inherits it from
...
parent when they are equal (only possible case for chunks created
by the parser)
2014-06-18 15:35:43 -03:00
Roberto Ierusalimschy
04da0a40c0
added assertion about sources being the same for all protos in a chunk
2014-06-18 10:54:31 -03:00
Roberto Ierusalimschy
eb67828236
changed macro for compatibility options + details
2014-06-18 10:24:01 -03:00
Roberto Ierusalimschy
94266dfdbd
source for all prototypes must be equal in a chunk; no need to store
...
each one separated
2014-06-18 10:21:12 -03:00
Roberto Ierusalimschy
e3871abe95
'math.ifloor' is back
2014-06-18 09:35:53 -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
fa3113ffbf
cleaner way to handle bit CIST_OAH (with auxiliar macros)
2014-06-12 16:07:30 -03:00
Roberto Ierusalimschy
d94bb6c273
janitor work on 'lua_resume' and related code
2014-06-11 13:01:55 -03:00
Roberto Ierusalimschy
5784331768
new items in default path for Windows
2014-06-10 16:21:20 -03:00
Roberto Ierusalimschy
88a9e51f34
bit-field CIST_YIELDED removed (it was never consulted)
2014-06-10 16:18:50 -03:00
Roberto Ierusalimschy
8b5940e7ca
must also reset CIST_OAH if necessary (CallInfo is not a fresh one)
2014-06-10 16:13:26 -03:00
Roberto Ierusalimschy
1a3656e56e
more relaxed rules for __eq metamethod (more similar to other
...
operators)
2014-06-10 15:53:18 -03:00
Roberto Ierusalimschy
542b6cfc02
no need for field 'status' in structure 'CallInfo' (after removal
...
of 'lua_getctx') + field 'old_allowhook' can be packed into a single
bit
2014-06-10 15:51:21 -03:00
Roberto Ierusalimschy
6f6fd96e3b
new type lua_KFunction + no more 'lua_getctx'
2014-06-10 14:41:38 -03:00
Roberto Ierusalimschy
35a6aad0d7
added comments
2014-06-09 13:32:18 -03:00
Roberto Ierusalimschy
23f0ff9517
lots of janitor work (including comments) + 'arg' table created
...
before running any script + changes in the parameters and return
of 'collectargs'
2014-06-05 17:42:06 -03:00
Roberto Ierusalimschy
355037528c
'math.mof' works with integers, too
2014-06-02 20:09:28 -03:00
Roberto Ierusalimschy
9e68c047ae
'assert' does not assume that the error object is a string
2014-06-02 00:06:26 -03:00
Roberto Ierusalimschy
e9d86eddf3
if numeral overflows the reading buffer, signal it as invalid input
...
(resulting in nil)
2014-06-02 00:00:51 -03:00
Roberto Ierusalimschy
11aefa4478
details (comments)
2014-06-01 21:03:16 -03:00
Roberto Ierusalimschy
5ebdd326b6
detail (to avoid warnings of unused variable)
2014-05-29 16:30:07 -03:00
Roberto Ierusalimschy
84db17b6fc
more "religious" definition for 'lua_numtointeger'
2014-05-27 10:59:03 -03:00
Roberto Ierusalimschy
456806f25c
no more 'math.ifloor' + new semantics for 'math.floor'/'math.ceil'
2014-05-26 14:13:52 -03:00
Roberto Ierusalimschy
c98f195eb9
function 'luaV_numtointeger' changed to a global macro
...
'lua_numtointeger' (tricky, small, and useful in several places)
2014-05-26 14:10:22 -03:00
Roberto Ierusalimschy
4d696c45b9
simpler handling of 'GCScallfin' state + more comments
2014-05-25 16:08:32 -03:00
Roberto Ierusalimschy
36715ab7c1
detail (comment)
2014-05-23 15:32:21 -03:00
Roberto Ierusalimschy
e966e53791
no more use of 'scanf' for reading numbers
2014-05-21 12:24:21 -03:00
Roberto Ierusalimschy
c4eff10322
small improvements concerning 'check_next'
2014-05-21 12:22:02 -03:00
Roberto Ierusalimschy
8a0acf0898
comments
2014-05-20 11:12:59 -03:00
Roberto Ierusalimschy
e2be310a85
better(?) implementation for 'pcall'/'xpcall' (regarding the insertion
...
of the boolean first result)
2014-05-16 15:54:01 -03:00
Roberto Ierusalimschy
17159b491c
more direct implementation of 'table.pack'
2014-05-16 15:53:25 -03:00
Roberto Ierusalimschy
0aa32fa0cb
small changes in field order in some structs to reduce padding
2014-05-15 17:41:27 -03:00
Roberto Ierusalimschy
8927c14317
removed macro 'luai_checknum' (as NaN trick is not doable now)
2014-05-15 17:28:39 -03:00
Roberto Ierusalimschy
3e977f02ac
added a few comments
2014-05-15 17:08:32 -03:00
Roberto Ierusalimschy
a73da6112d
deprecated library throws an error if called (instead of silently
...
not loading itself)
2014-05-15 16:28:34 -03:00
Roberto Ierusalimschy
6a5d87771f
added lots of new comments + small changes in code
2014-05-15 16:27:33 -03:00
Roberto Ierusalimschy
15e8405731
'LUA_COMPAT_ALL' -> 'LUA_COMPAT_5_1'/'LUA_COMPAT_5_2' + "@*" in
...
comments replaced by "@@". ("@*" is too distracting)
2014-05-15 12:24:32 -03:00
Roberto Ierusalimschy
fd1672ba98
avoid non-conformant pointer arithmetic in api check for 'lua_rotate'
2014-05-15 12:22:45 -03:00
Roberto Ierusalimschy
1ddb251d86
using a more conventional handling of stack space in 'io_readline'
2014-05-15 12:21:06 -03:00
Roberto Ierusalimschy
f8daddba50
added a compat option (although it will be off by default) to
...
the addition of '.0' to float->string conversions
2014-05-14 16:47:11 -03:00
Roberto Ierusalimschy
e58ef8d0bb
missing macro 'LUAMOD_API' in function to open library
2014-05-14 15:33:37 -03:00
Roberto Ierusalimschy
e3b9569e04
function 'reverse' uses appropriate variants of 'setobj' for better
...
documentation
2014-05-14 15:32:30 -03:00
Roberto Ierusalimschy
8b66040e34
several functions deprecated (cosh, sinh, atanh, pow, frexp, ldexp)
2014-05-14 13:59:27 -03:00
Roberto Ierusalimschy
965993da07
comments added to 'lua_rotate'
2014-05-14 11:20:17 -03:00
Roberto Ierusalimschy
5a5a834975
new API function 'lua_rotate'
2014-05-13 16:40:28 -03:00
Roberto Ierusalimschy
45c430eac0
addition of '.0' to float representation done by the kernel
2014-05-12 18:44:17 -03:00
Roberto Ierusalimschy
27d9219cf3
no more integer exponentiation
2014-05-12 18:22:05 -03:00
Roberto Ierusalimschy
12bd01c567
added comments to several functions
2014-05-12 16:13:32 -03:00
Roberto Ierusalimschy
626124d2d8
old POSIX systems need '<sys/types.h>' for 'off_t'
2014-05-11 11:46:19 -03:00
Roberto Ierusalimschy
5018104a60
better error message for unfinished long strings/comments
2014-05-11 11:45:43 -03:00
Roberto Ierusalimschy
ec11d132db
comments
2014-05-11 10:03:48 -03:00
Roberto Ierusalimschy
06dc893f88
in 'for' loops, make the limit an integer whenever initial value and
...
step are integers
2014-05-09 11:20:52 -03:00
Roberto Ierusalimschy
a09bd59615
'T.totalmem' accepts 0 for unlimited memory
2014-05-08 16:08:46 -03:00
Roberto Ierusalimschy
42ff788e53
comments
2014-05-08 15:58:46 -03:00
Roberto Ierusalimschy
1bd70a8e40
new function 'lua_isyieldable' (and 'coroutine.isyieldable')
2014-05-08 10:52:20 -03:00
Roberto Ierusalimschy
ef83457427
updated several 'fix' fields
2014-05-07 13:57:27 -03:00
Roberto Ierusalimschy
4833fb8273
marks for releases 5.2.2 and 5.2.3 + correction in last bug's description
2014-05-07 13:35:24 -03:00
Roberto Ierusalimschy
77e7ebca0a
better alignments (for 64-bit arquitectures) for structures 'Table' and
...
'TString'
2014-05-07 08:12:51 -03:00
Roberto Ierusalimschy
6d5324f92f
'math.fmod' handles integers as integers
2014-05-02 13:36:51 -03:00
Roberto Ierusalimschy
4fe11ae232
'lua_getuservalue' returns type of user value
2014-05-01 15:21:32 -03:00
Roberto Ierusalimschy
c549d4fe64
'lua_strtonum' (and 'luaO_str2num') now return string size, instead of
...
receiving it
2014-05-01 15:18:06 -03:00
Roberto Ierusalimschy
ddff6ecf30
function 'limittointeger' no needed (now that 'tointeger_aux' handles
...
integers too)
2014-04-30 16:29:51 -03:00
Roberto Ierusalimschy
6b630c0fa0
debug.numbits replaced by debug.Csize
2014-04-30 15:59:15 -03:00
Roberto Ierusalimschy
1a6ef098b0
'luaO_str2d' + 'luaO_str2int' replaced by 'luaO_str2num' plus proper
...
conversion from strings to integers
2014-04-30 13:50:16 -03:00
Roberto Ierusalimschy
5388aa9fc0
'luaO_str2d' + 'luaO_str2int' replaced by 'luaO_str2num' (which converts
...
to float or integer according to the string syntax)
2014-04-30 13:48:44 -03:00
Roberto Ierusalimschy
b123a88673
merge of common parts from 'limittointeger' and 'luaV_tointeger_'
2014-04-29 17:06:05 -03:00
Roberto Ierusalimschy
ffa43df3cd
'setnvalue' -> 'setfltvalue' (for consitency with 'fltvalue')
2014-04-29 15:14:16 -03:00
Roberto Ierusalimschy
9c4398de8f
'for' loop tries to convert limit to integer when initial value and
...
step are integers
2014-04-29 15:11:57 -03:00
Roberto Ierusalimschy
a0d4f0fc8a
template for 'mkstemp' is configurable (via LUA_TMPNAMTEMPLATE)
2014-04-29 14:05:13 -03:00
Roberto Ierusalimschy
68616c6669
using lua_Unsigned (instead of lua_Integer) for bit manipulation
2014-04-27 11:42:26 -03:00
Roberto Ierusalimschy
e98ba351ce
n^-m gives float result (instead of error)
2014-04-27 11:41:11 -03:00
Roberto Ierusalimschy
cbe4998bc2
'math.random(n,m)' interval restricted in size, to avoid using conversion
...
between 'double' and 'unsigned' (which can be slow and unreliable)
2014-04-17 13:09:40 -03:00
Roberto Ierusalimschy
0172c9552c
comment
2014-04-17 11:41:11 -03:00
Roberto Ierusalimschy
3d4913f703
back to larger sizes for 'dumpint/undumpint' (small Lua should
...
be able to dump/undump long-long integers)
2014-04-16 15:48:31 -03:00
Roberto Ierusalimschy
c27ef1b79c
correct integer limits for Windows + small adjustments for short
...
option
2014-04-16 15:45:51 -03:00
Roberto Ierusalimschy
4422b97472
keep 'luaL_checkversion_' with its signature in version 5.2, for
...
correct error messages in case of version mixings
2014-04-15 15:25:49 -03:00
Roberto Ierusalimschy
2f02d264e9
initial '*' in 'io.read' formats is deprecated
2014-04-15 13:46:45 -03:00
Roberto Ierusalimschy
037a70dfea
cast_u2s/cast_s2u renamed l_castS2U/l_castU2S to be configurable from
...
outside (mostly for testing)
2014-04-15 13:32:49 -03:00
Roberto Ierusalimschy
8f961da3db
macros cast_integer/cast_unsigned replaced by cast_u2s/cast_s2u, that
...
should be used only between lua_Integer and lua_Unsigned
2014-04-15 11:29:30 -03:00
Roberto Ierusalimschy
5c46b7b8cf
instructions in 'runC' sorted alphabetically + new instructions
...
'tointeger'/'tounsigned'
2014-04-14 15:42:44 -03:00
Roberto Ierusalimschy
a2c094fe2d
size of strings in 'string.rep' should be limited by the size of
...
lua_Integer, not of 'int'
2014-04-14 13:59:46 -03:00
Roberto Ierusalimschy
f767f29d87
using predefined limits (instead of computing min/max values for each
...
type) + some comments
2014-04-14 13:58:54 -03:00
Roberto Ierusalimschy
675530c4d8
maximum size of array part of a table now is restricted not only by
...
the size of an 'int', but also by the size of a 'lua_Integer'
2014-04-13 18:11:19 -03:00
Roberto Ierusalimschy
ab964ad7c6
new macro LUA_MAXUNSIGNED + support for 'short' integers (for tests only)
2014-04-12 11:51:53 -03:00
Roberto Ierusalimschy
ef789d4161
new global macro 'LUA_MAXUNSIGNED'
2014-04-12 11:45:10 -03:00
Roberto Ierusalimschy
b390d7c168
detail (avoid "casting down" in case lua_Integer is smaller than int)
2014-04-12 11:43:50 -03:00
Roberto Ierusalimschy
218f358461
errors like 1e100 << "2" were giving wrong messages
2014-04-11 17:17:39 -03:00
Roberto Ierusalimschy
bf06e22b6a
correct definition for 'MAX_SIZE' (using singed integers as the limit,
...
not unsigned ones) + new type 'l_uacInt'
2014-04-11 16:56:04 -03:00
Roberto Ierusalimschy
d99ffa920d
new type 'LUAI_UACINT' (result of an 'usual argument conversion' of
...
a lua_Integer)
2014-04-11 16:53:45 -03:00
Roberto Ierusalimschy
2771050dfa
'MIN/MAX_INTEGER' replaced by 'LUA_MIN/MAXINTEGER'
2014-04-11 16:02:16 -03:00
Roberto Ierusalimschy
e1daf10e4c
details in comments
2014-04-11 15:19:07 -03:00
Roberto Ierusalimschy
115fa77009
maximum size for dump of integers is size of lua_Integer (which
...
means that there is no overflows when undumping)
2014-04-10 16:45:43 -03:00
Roberto Ierusalimschy
561030c211
pack/unpack functions renamed dump/undump
2014-04-10 15:24:12 -03:00
Roberto Ierusalimschy
5336cc9d6a
math.random: use 'random' when available + changes to work correctly
...
for any integer interval (up to [minint,maxint])
2014-04-10 14:53:33 -03:00
Roberto Ierusalimschy
fdd137276b
more precision for PI + no more RADIANS_PER_DEGREE +
...
'min/maxint' -> 'min/maxinteger'
2014-04-09 14:29:46 -03:00
Roberto Ierusalimschy
a8aede68c7
new definition for 'luai_nummod' (using 'fmod')
2014-04-09 14:05:11 -03:00
Roberto Ierusalimschy
c7859a046d
using 'volatile' in 'tofloat' to ensure result has the same precision
...
(lua_Number) of other computations
2014-04-08 11:28:04 -03:00
Roberto Ierusalimschy
4a24883674
'GCmemtrav' does not need to track the entire collection, only each
...
single step individually
2014-04-04 14:01:04 -03:00
Roberto Ierusalimschy
9737832641
'int' -> 'lua_Integer' in several functions
2014-04-04 13:38:11 -03:00
Roberto Ierusalimschy
8b45d9806a
new constants 'math.maxint'/'math.minint'
2014-04-03 11:18:19 -03:00
Roberto Ierusalimschy
be52f784d9
new macros LUA_MAXINTEGER/LUA_MININTEGER
2014-04-03 11:18:02 -03:00
Roberto Ierusalimschy
144afa4d47
several changes in 'utf8.offset'
2014-04-03 10:45:09 -03:00
Roberto Ierusalimschy
007f66408d
bug: compiler can optimize away overflow check in 'table.concat'
2014-04-03 10:30:23 -03:00
Roberto Ierusalimschy
48c745a611
avoid constant overflow when shifting left signed integers until
...
their last bit
2014-04-03 10:29:24 -03:00
Roberto Ierusalimschy
3a044de5a1
new implementation for 'utf8.len'
2014-04-02 14:01:22 -03:00
Roberto Ierusalimschy
7d514af0bc
bug (in work version): comparisons should not try to convert
...
strings to numbers
2014-04-02 13:54:20 -03:00
Roberto Ierusalimschy
f61ceee708
LUAI_FUNC is being used only in header files
2014-04-02 13:44:42 -03:00
Roberto Ierusalimschy
5aeb57f11f
detail (error message for conversion from float to integer)
2014-04-01 15:55:06 -03:00
Roberto Ierusalimschy
493b3fdd65
added an 'api_check' for negative sizes in 'lua_checkstack'
2014-04-01 15:51:23 -03:00
Roberto Ierusalimschy
315c5bf7b7
bug: compiler could optimize away overflow check (+ changing indices
...
from 'int' to 'lua_Integer')
2014-04-01 15:50:34 -03:00
Roberto Ierusalimschy
607be77ec8
some details to avoid warnings
2014-04-01 11:39:55 -03:00
Roberto Ierusalimschy
0d745ed04c
more precise estimation (GCestimate) for total bytes in use after
...
a GC cycle
2014-04-01 11:06:59 -03:00
Roberto Ierusalimschy
3d1c6730da
detail ('1U' -> '1u', like other unsigned constants in the code)
2014-03-31 16:18:24 -03:00
Roberto Ierusalimschy
66b7b9b582
math.abs, math.max, and math.min work for integers, too.
2014-03-31 16:00:52 -03:00
Roberto Ierusalimschy
8ef9117924
fancier way to do sign extension
2014-03-31 15:38:26 -03:00
Roberto Ierusalimschy
ea69f17d98
macro 'tostring' is used only by 'luaV_concat'
2014-03-31 15:37:52 -03:00
Roberto Ierusalimschy
420cc62fac
missplelling in comments/function names (endianess -> endianness)
2014-03-27 12:58:05 -03:00
Roberto Ierusalimschy
1a3ebc203a
definition of LUA_REAL_* and LUA_INT_* moved to the beginning of
...
configurations
2014-03-21 11:27:16 -03:00
Roberto Ierusalimschy
2d5e2212d4
native lua_Number may be neither float nor double (in pack/unpackfloat)
2014-03-21 11:26:44 -03:00
Roberto Ierusalimschy
da4811238a
details (typos in comments)
2014-03-21 10:52:33 -03:00
Roberto Ierusalimschy
f96872a534
copyright year -> 2014
2014-03-20 16:42:35 -03:00
Roberto Ierusalimschy
738b3b64af
detail (to avoid warnings with '-O3')
2014-03-20 16:36:02 -03:00
Roberto Ierusalimschy
363b525c23
does not create library when it is deprecated
2014-03-20 16:22:16 -03:00
Roberto Ierusalimschy
469daa16ee
configuration for Lua type corresponding to 'time_t'
2014-03-20 16:18:54 -03:00
Roberto Ierusalimschy
7707f3e7c3
'posrelat' -> 'u_posrelat' (to avoid name conflict in 'one.c')
2014-03-20 11:11:00 -03:00
Roberto Ierusalimschy
16f8e44924
with 64-bit integers, file offsets do not need to be floats
2014-03-19 15:57:42 -03:00
Roberto Ierusalimschy
2f5f77788f
removed function 'luaS_eqstr' (not used anywhere)
2014-03-19 15:51:42 -03:00
Roberto Ierusalimschy
ed795d5ff4
detail (removed unused prototype)
2014-03-19 15:51:16 -03:00
Roberto Ierusalimschy
282d67d8fc
bitlib has been deprecated
2014-03-18 15:27:08 -03:00
Roberto Ierusalimschy
114d10cbc5
detail (comment)
2014-03-15 09:29:48 -03:00
Roberto Ierusalimschy
9f3f5b6f41
details
2014-03-14 13:54:08 -03:00
Roberto Ierusalimschy
a39489194e
changing prefix of configurable macros from "lua_" to "l_"
2014-03-13 17:07:18 -03:00
Roberto Ierusalimschy
a3addae036
lua_gettable and similars return type of gotten value
2014-03-12 17:57:40 -03:00
Roberto Ierusalimschy
ad40bb1181
detail in string.rep: allow large repetitions of the empty string (no
...
possibility of overflows)
2014-03-12 15:09:06 -03:00
Roberto Ierusalimschy
80fe8504f5
make all dumps/loads go trhough Load/DumpVector (so it is easier
...
to adapt the code to correct endianess, if needed)
2014-03-11 15:56:27 -03:00
Roberto Ierusalimschy
e976384213
keep chunk's headers compatible at least up to LUAC_VERSION (to be
...
able to detect correctly version mismatches)
2014-03-11 15:05:46 -03:00
Roberto Ierusalimschy
68f4ccdd00
make sure that LUAC_INT is a lua_Integer and that LUAC_NUM is
...
a lua_Number
2014-03-11 11:22:54 -03:00
Roberto Ierusalimschy
342a936599
detail (breaking too long lines)
2014-03-10 16:52:47 -03:00
Roberto Ierusalimschy
901da539e5
no need to avoid negative ints in 'LoadInt'
2014-03-10 16:50:19 -03:00
Roberto Ierusalimschy
197e249433
"indent -kr -i2 -br -brf -nut" plus a few manual formating
2014-03-10 14:56:32 -03:00
Roberto Ierusalimschy
2aff75f58e
small bug (from revision 2.80): LUA_OP* constants are not from
...
enumeration 'Opcode' (they are integers)
2014-03-09 16:21:34 -03:00
Roberto Ierusalimschy
cd12410195
new macro 'cast_void'
2014-03-07 13:19:00 -03:00
Roberto Ierusalimschy
c5bb3643ab
simpler code to read a line from a file (using 'getc' or, if present,
...
'getc_unlocked')
2014-03-06 14:12:02 -03:00
Roberto Ierusalimschy
5ff1c18a71
back with 'L' for macros 'luai_num*', but now with a new macro
...
'luai_numinvalidop' to protect constant folding
2014-03-06 13:15:18 -03:00
Roberto Ierusalimschy
99ac4a260f
'constfolding' passes a proper Lua state to 'luaO_arith'
2014-03-06 10:58:28 -03:00
Roberto Ierusalimschy
fa7e77fd38
detail ('codearith' uses 'LUA_OP*' constants instead of 'OP_*')
2014-03-06 10:39:05 -03:00
Roberto Ierusalimschy
f69e0ade19
no need to store a full 'size_t' fo the size of (frequent) small strings
2014-03-01 12:18:44 -03:00
Roberto Ierusalimschy
99a1c06ea3
more regularity with vectors + sizeof computed by the macros themselves
2014-02-28 13:13:01 -03:00
Roberto Ierusalimschy
93e28031de
all chars used in binary dumps are unsigned ('lu_byte')
2014-02-28 09:25:12 -03:00
Roberto Ierusalimschy
de84b3fecb
store number of upvalues of main function in front of the dump,
...
so that undump can create initial closure before reading its prototype
2014-02-27 15:56:15 -03:00
Roberto Ierusalimschy
054179c2ff
more explicit handling of headers for binary chunks
2014-02-27 13:56:20 -03:00
Roberto Ierusalimschy
986c11daa6
removal of weird construction in definition of LUA_STRFTIMEOPTIONS
...
(two empty strings concatenated as in "" "")
2014-02-26 12:55:58 -03:00
Roberto Ierusalimschy
c6c41e85b2
more uniformity for defining system-dependent features
2014-02-26 12:27:56 -03:00
Roberto Ierusalimschy
87c930676f
detail (comments)
2014-02-26 09:39:30 -03:00
Roberto Ierusalimschy
11e762dbcd
added macro MAX_UINTEGER
2014-02-26 09:38:43 -03:00
Roberto Ierusalimschy
5c9cb5f0b1
detail (comment)
2014-02-26 09:38:18 -03:00
Roberto Ierusalimschy
fed236ca7f
detail (unknown lines are marked as -1, not 0)
2014-02-25 11:31:16 -03:00
Roberto Ierusalimschy
295f7ac04e
added 'stip' parameter to lua_dump/string.dump
2014-02-25 11:30:21 -03:00
Roberto Ierusalimschy
6318de80d3
added 'strip' parameter to lua_dump/string.dump
2014-02-25 11:30:21 -03:00
Roberto Ierusalimschy
5715de344f
'read_all' does not need to grow buffer, as 'luaL_prepbuffsize'
...
already does that
2014-02-21 11:39:50 -03:00
Roberto Ierusalimschy
c86b9da022
userdata can have any Lua value as uservalue
2014-02-19 10:52:42 -03:00
Roberto Ierusalimschy
a4c6dcf999
detail (better error messages for light userdata)
2014-02-19 10:48:53 -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
d764cc5522
new list 'twups' to allow traversal of upvalues from dead threads
...
(+ fixed some problems with cycles involving those upvalues)
2014-02-18 10:39:37 -03:00
Roberto Ierusalimschy
ffa96d988d
field 'op' renamed to 'open'
2014-02-15 11:12:01 -02:00
Roberto Ierusalimschy
6a24bd17a8
no more second result from 'collectgarbage"count"' (as Lua seldom
...
will need lua_Number to be an integer)
2014-02-14 14:45:38 -02:00
Roberto Ierusalimschy
1cce3e6842
change in the way 'collectgarbage("step", size)' interprets 'size'
...
(mimicking the way the GC itself behaves when Lua allocates 'size'
Kbytes)
2014-02-14 14:43:14 -02:00
Roberto Ierusalimschy
0b04c561f5
new syntax for Unicode escape '\u{012F}'
2014-02-14 13:23:51 -02:00
Roberto Ierusalimschy
90b0ac6495
limit to 'gcstepmul' imposed by 'lua_gc' (+ some details in 'lgc.c')
2014-02-13 15:25:20 -02:00
Roberto Ierusalimschy
de3b1c9b53
better control for number of finalizers called at each GC cycle
...
(increases progressively)
2014-02-13 12:46:38 -02:00
Roberto Ierusalimschy
733c58595b
no more local collection
2014-02-13 10:11:34 -02:00
Roberto Ierusalimschy
4a1ed6e6e5
new field '__name' in metatables to help better error messages
2014-02-11 15:39:15 -02:00
Roberto Ierusalimschy
6b30774469
detail (better presentation for 'luaC_step')
2014-02-11 10:28:47 -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
68df7c6279
added proper headers for a standard lib file
2014-02-06 18:03:24 -02:00
Roberto Ierusalimschy
19ad78d713
C++ needs casts for arithmetic with enums
2014-02-06 17:55:55 -02:00
Roberto Ierusalimschy
6ccf150039
new library: utf8
2014-02-06 15:32:33 -02:00
Roberto Ierusalimschy
4ea60463f5
UTF-8 encoding exported as format '%U' in 'lua_pushfstring'
2014-02-06 13:59:24 -02:00
Roberto Ierusalimschy
d438e1379d
insertion of ".0" in floats with integer values done by "luaL_tolstring",
...
not by the core
2014-02-05 17:14:53 -02:00
Roberto Ierusalimschy
1721d09ac8
still accepts initial '=' for expressions, for compatibility with old
...
versions (and old habits...)
2014-02-05 12:22:55 -02:00
Roberto Ierusalimschy
2f3da00e51
added support for UTF-8 escapes
2014-02-04 16:57:34 -02:00
Roberto Ierusalimschy
5a73e3ad9e
simpler way to create messages for errors in escape sequences
2014-01-31 13:14:22 -02:00
Roberto Ierusalimschy
86dd8bf3f5
no more 'L' in macros "luai_num*" (several places that use those macros
...
cannot throw errors anyway...)
2014-01-27 11:34:32 -02:00
Roberto Ierusalimschy
67c5de9283
comment
2014-01-27 11:28:45 -02:00
Roberto Ierusalimschy
0a850e641d
larger limit + better error messages for loop detection in inheritance
2014-01-22 18:02:04 -02:00
Roberto Ierusalimschy
916bd874ad
added explicit default options to string.pack/unpack functions
2014-01-09 14:21:28 -02:00
Roberto Ierusalimschy
cd848cab6b
first implementation for string.pack/unpackfloat + try not to assume
...
that chars have 8 bits
2014-01-08 16:34:34 -02:00
Roberto Ierusalimschy
29256e8960
first implementation of string.packint/string.unpackint
2014-01-05 12:05:58 -02:00
Roberto Ierusalimschy
438c534ff4
'arg' arguments (previously called 'narg', 'nArg', 'numArg', etc.)
...
renamed all to 'arg'
2014-01-05 12:04:46 -02:00
Roberto Ierusalimschy
1ea2d20f74
first implementation of '<<', '>>', and '~' (bitwise not)
2013-12-30 18:47:58 -02:00
Roberto Ierusalimschy
f5133aa1a5
small change in handling of unary operations
2013-12-18 16:44:42 -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
a8f8c7fd80
integer exponentiation with negative exponent is invalid
2013-12-16 12:30:22 -02:00
Roberto Ierusalimschy
1a19893d6f
new "calculator mode"; no need to add '=' to print expressions
2013-12-16 12:27:17 -02:00
Roberto Ierusalimschy
88e23f508c
details
2013-12-13 13:42:08 -02:00
Roberto Ierusalimschy
c8585efc78
use goto to implement a tail call in 'reallymarkobject'
2013-12-13 13:17:00 -02:00
Roberto Ierusalimschy
16493b777f
'lua_sethook' returns void
2013-12-09 12:21:10 -02:00
Roberto Ierusalimschy
cac1ebd1e0
detail ('ttisuserdata' renamed to 'ttisfulluserdata')
2013-12-04 10:15:22 -02:00
Roberto Ierusalimschy
73c5515e00
details (comments)
2013-11-21 15:23:14 -02:00
Roberto Ierusalimschy
e34c35abcf
new bug: Resuming the running coroutine makes it unyieldable
2013-11-08 16:23:16 -02:00
Roberto Ierusalimschy
7a8eb83b4a
bug: attempting to resume the running coroutine makes it unyieldable
2013-11-08 16:16:33 -02:00
Roberto Ierusalimschy
ab5fa213b3
added patch for last bug
2013-11-08 15:45:10 -02:00
Roberto Ierusalimschy
39929384c6
new macro 'luai_userstateclose' (to test it is being called correctly)
2013-11-08 15:36:05 -02:00
Roberto Ierusalimschy
de7cf8e63a
bug: should call 'luai_userstateclose' only when 'luai_userstateopen'
...
has been called before
2013-11-08 15:34:22 -02:00
Roberto Ierusalimschy
124598917f
"./?/init.lua" added to default path
2013-10-10 12:45:03 -03:00
Roberto Ierusalimschy
c5fcba1a17
detail (changing some names of macros)
2013-10-07 11:20:31 -03:00
Roberto Ierusalimschy
4c6dfc342b
CallInfo lists shrinks together with their associated stacks
2013-09-17 12:40:06 -03:00
Roberto Ierusalimschy
686e57cf9c
GC local pause configurable
2013-09-13 13:21:52 -03:00
Roberto Ierusalimschy
06156e7575
detail (setmetatable do not need to use a back GC barrier)
2013-09-11 17:15:31 -03:00
Roberto Ierusalimschy
2e2c109daf
type of 'refcount' changed to lu_mem (to ensure there will be no
...
overflows)
2013-09-11 12:17:00 -03:00
Roberto Ierusalimschy
6ca7b63bce
check for shrinking string table done only at the end of a GC cycle
2013-09-11 11:56:15 -03: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
7061fe1d56
detail: 'sweepstep' checks end of phase after calling 'sweeplist', so
...
that phases with small lists return 0 at the first call to 'sweepstep'
2013-09-11 10:24: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
1150873447
'luaC_newobj' does not handle special cases; only special case
...
now is threads, which do not use 'luaC_newobj' anymore.
2013-09-11 09:26:14 -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
8ef9e8460e
bug (GC can collect long identifier during parser) + change (using
...
a single constant table for all functions in a chunk)
2013-08-30 13:01:37 -03:00
Roberto Ierusalimschy
4f292d753c
bug: GC can collect a long string still in use during parser
2013-08-30 12:51:12 -03:00
Roberto Ierusalimschy
26629d0af1
details (a few casts moved from macro invocation to macro definition)
2013-08-29 10:49:57 -03:00
Roberto Ierusalimschy
b5e75fde4e
bug: local collection must clear rest of stack
2013-08-29 10:34:16 -03:00
Roberto Ierusalimschy
9a871dd3db
tables and userdata all go to local list, too
2013-08-28 15:30: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
50955e27f5
C functions and strings now go to the local list; first version
...
of the local collector
2013-08-23 10:34:54 -03:00
Roberto Ierusalimschy
33c49f7fa0
some details over new implementation of string table
2013-08-22 12:21:48 -03:00
Roberto Ierusalimschy
0df6635711
"fixed" objects kept in a separated list (instead of being kept in
...
'allgc' list with a bit marking them)
2013-08-21 17:09:51 -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
8c68863960
initial size of string table (MINSTRTABSIZE) should be large enough
...
to hold all strings needed by an empty Lua state
2013-08-21 16:02:30 -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
9eff921f8f
"barrier" for link prototype->cache changed to be consistent with
...
GC behavior (link is cleared to preserve invariant)
2013-08-19 11:18:43 -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
3679d33b02
barrier conditions rewritten to test first 'isblack' and then 'iswhite'
...
(during a pause all objects are white, so 'isblack' fails much more
often than 'iswhite')
2013-08-13 14:36:44 -03:00
Roberto Ierusalimschy
78b941039d
change to allow collector to stop when it goes to the atomic phase
...
(just for debugging)
2013-08-07 12:39:09 -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
4244da96bf
'debug.subtype' -> 'math.type' (to distinguish integers and floats)
2013-07-22 13:05:53 -03:00
Roberto Ierusalimschy
fcf99bf788
'math.isfloat' replaced by 'debug.subtype'
2013-07-10 17:57:05 -03:00
Roberto Ierusalimschy
98d76cdcae
bug: Wrong error message in some short-cut expressions
2013-07-10 17:32:36 -03:00
Roberto Ierusalimschy
2f8c51a552
use unsigneds for unary minus, too
2013-07-10 14:15:12 -03:00
Roberto Ierusalimschy
b5f5fcd782
use different constants (instead of different values for the same constant)
...
to define number sizes (LUA_INT_INT/LUA_INT_LONG/LUA_INT_LONGLONG and
LUA_REAL_FLOAT/LUA_REAL_DOUBLE/LUA_REAL_LONGDOUBLE) + use __int64 and
I64 instead of long long (and ll) for Windows
2013-07-09 15:31:35 -03:00
Roberto Ierusalimschy
2ef9bcfd11
avoid undefined shift of LUA_NBITS in rotate operation
2013-07-09 15:31:01 -03:00
Roberto Ierusalimschy
5fa680d47f
no need for type 'b_uint' (lua_Unsigned must have at least 32 bits)
2013-07-09 14:49:50 -03:00
Roberto Ierusalimschy
48735da0d0
When loading a file, Lua may call the reader function again after
...
it returned end of input + luac listings choke on long strings
2013-07-05 15:02:28 -03:00
Roberto Ierusalimschy
2b4bd21585
'tonumber': base must be a number
2013-07-05 11:39:15 -03:00
Roberto Ierusalimschy
beff5b078a
'tonumber': does not accept numbers when given a base + convertion from
...
strings to numbers with a base moved to a separated function (more
modular)
2013-07-05 11:35:49 -03:00
Roberto Ierusalimschy
5519c98655
'lua_cvtonum' -> 'lua_strtonum'; converts only strings to numbers
2013-07-05 11:29:51 -03:00
Roberto Ierusalimschy
cbe164191c
new function 'ifloor'
2013-07-03 14:23:19 -03:00
Roberto Ierusalimschy
66d046833d
no need to check "bad conversion number->int;" in luaL_checkversion,
...
as now Lua does not use tricks for the conversion, but there is a
need to check the sizes of number types, as they can be different
in two modules
2013-06-27 15:32:33 -03:00
Roberto Ierusalimschy
15fdbd26fe
'numbits' moved from 'math' to 'debug' library
2013-06-25 16:37:00 -03:00
Roberto Ierusalimschy
2b4975dca7
LUA_SMALL_* changed to LUA_*SIZE + added support for long double + better
...
support for ANSI systems
2013-06-25 16:04:40 -03:00
Roberto Ierusalimschy
e39da66c8c
macro 'lua_strx2number' does not need to be global
2013-06-25 15:58:32 -03:00
Roberto Ierusalimschy
483c2ccd0f
avoid using raw representation of numbers for hashing, as number may
...
not use all its space (e.g., long double can have sizeof=12 but
use only 10 bytes)
2013-06-25 15:57:18 -03:00
Roberto Ierusalimschy
982aa7058f
'luaL_len' returns lua_Integer instead of 'int'
2013-06-25 11:05:26 -03:00
Roberto Ierusalimschy
80cdf39d0e
avoid using 'modf' in the implementation of 'math.modf', to avoid
...
problems with 'double*'. (When using 'float' as lua_Number,
'float*' is not compatible with 'double*'...)
2013-06-25 11:02:18 -03:00
Roberto Ierusalimschy
45f3797a5b
'long' may have more than 32 bits in some machines; use 'int' for
...
small lua_Integer unless necessary to use 'long'
2013-06-21 14:42:28 -03:00
Roberto Ierusalimschy
de6e5a5919
small bugs uncovered in a 64-bit machine (where 'long' has 64 bits)
2013-06-21 14:27:24 -03:00
Roberto Ierusalimschy
81102d3689
try to avoid warnings when converting int to pointer
2013-06-20 18:59:13 -03:00
Roberto Ierusalimschy
6579bd4190
reorganization of warnings + update of explicit dependencies (gcc -MM)
2013-06-20 15:56:51 -03:00
Roberto Ierusalimschy
f45177f2d3
In the table that hashes constants, use a light userdata as keys
...
to integer values to avoid collisions with floats with the same
numerical value
2013-06-20 14:37:31 -03:00
Roberto Ierusalimschy
d6f5fb2d2c
avoid warning for unary minus over an unsigned value
2013-06-20 12:12:43 -03:00
Roberto Ierusalimschy
7c4cc505db
added "reasonable" limit for 'string.rep' (otherwise it is too easy
...
to crash the machine)
2013-06-20 12:06:51 -03:00
Roberto Ierusalimschy
453450d687
new macro 'l_floor' (allows 'floorf' even when other math operations
...
do not have an 'f' variant)
2013-06-20 12:02:49 -03:00
Roberto Ierusalimschy
55f566bd22
use lua_Integer for integer parameters to avoid truncation
2013-06-19 11:29:01 -03:00
Roberto Ierusalimschy
130c0e40e0
new constant 'MAX_SIZE', distinct from 'MAX_SIZET', for sizes visible
...
from Lua; these must fit in a lua_Integer
2013-06-19 11:27:00 -03:00
Roberto Ierusalimschy
c72fb1cf8e
detail (removed 'assert')
2013-06-14 17:46:40 -03:00
Roberto Ierusalimschy
138e69cc55
correct error message for floating-point values out of (integer) range
2013-06-14 15:34:49 -03:00
Roberto Ierusalimschy
53210d7e5b
correct way (I hope) to convert floats to unsigned int
2013-06-14 15:32:45 -03:00
Roberto Ierusalimschy
0394314c7a
avoid using a negative value to test 'lua_tounsigned'
2013-06-14 15:12:53 -03:00
Roberto Ierusalimschy
0beeb4f6fa
configuration of number sizes goes "mainstream"
2013-06-13 16:35:08 -03:00
Roberto Ierusalimschy
788b251157
'math.random' operates with integers when used for integer results
...
(1 or 2 parameters)
2013-06-13 16:32:52 -03:00
Roberto Ierusalimschy
318575627f
avoid adding '.0' to "numbers" like "nan" and "inf"
2013-06-07 16:02:05 -03:00
Roberto Ierusalimschy
a14992992a
new version (5.3)
2013-06-07 16:01:50 -03:00
Roberto Ierusalimschy
48adb6984c
'io.write' writes integers directly (and correctly)
2013-06-07 16:01:35 -03:00
Roberto Ierusalimschy
c5069528e1
details ('Type* id' -> 'Type *id')
2013-06-07 11:51:10 -03:00
Roberto Ierusalimschy
6fb0b11350
string contatenation handles conversion of integers to strings +
...
floats always format as floats (with decimal dot or exponent)
2013-06-04 16:36:42 -03:00
Roberto Ierusalimschy
932e7fb0e1
'lua_tounsigned' takes number modulo 2^numbits as a result when
...
number is a float
(That may change...)
2013-06-04 16:34:51 -03:00
Roberto Ierusalimschy
188192ce9a
'luai_hashnum' "inlined" into 'hashfloat'
2013-05-29 11:05:03 -03:00
Roberto Ierusalimschy
fc083f1138
removed all tricks for conversions + 'luai_hashnum' moved to ltable.c
2013-05-29 11:04:15 -03:00
Roberto Ierusalimschy
ee865b9fe7
new implementation for 'lua_strx2number' to correct small
...
problems with numbers like 0x10000...000p-100
2013-05-27 14:42:38 -03:00
Roberto Ierusalimschy
d630daca1a
"legal" way to convert a float to an integer in C
2013-05-27 09:43:37 -03:00
Roberto Ierusalimschy
8c883cb4e8
'objlen' can return integers
2013-05-26 11:47:51 -03:00
Roberto Ierusalimschy
c75cca0559
detail (case '%d' of 'luaO_pushvfstring' should use integers)
2013-05-26 11:43:35 -03:00
Roberto Ierusalimschy
1414b7123c
support for the case when 'l_mathop' does not conform to lua_Number
...
(problem with pointers to lua_Number solved by a typedef selected
automatically by 'l_mathop')
2013-05-26 10:45:24 -03:00
Roberto Ierusalimschy
3563b3f519
first version of control for number sizes (still in 'local' section)
2013-05-26 10:35:52 -03:00
Roberto Ierusalimschy
d46ed54646
no more IEEE tricks
2013-05-26 10:26:34 -03:00
Roberto Ierusalimschy
e2c8c756ee
removed 'IEEE tricks' (should not be needed in Lua with integers)
2013-05-23 18:27:06 -03:00
Roberto Ierusalimschy
5ca5086c19
'tonumber' now works with integers too
2013-05-16 15:35:57 -03:00
Roberto Ierusalimschy
2d6a0ae149
added patch to last bug
2013-05-16 13:03:50 -03:00
Roberto Ierusalimschy
b5ec26101f
new API function 'lua_cvtonum' to convert a value (number or string)
...
to a number, following the rules of the language to create integers
or floats
2013-05-14 13:00:11 -03:00
Roberto Ierusalimschy
36e8771076
'luaO_str2int' more generic: accepts white spaces around the numeral
...
and handles signal
2013-05-14 12:59:04 -03:00
Roberto Ierusalimschy
27f09415e3
new read format "*i" for reading integers
2013-05-14 12:57:43 -03:00
Roberto Ierusalimschy
4ad9970649
uses integers for time
2013-05-14 12:57:11 -03:00
Roberto Ierusalimschy
bef345a4b8
bug: Wrong error message in some short-cut expressions
2013-05-13 13:17:47 -03:00
Roberto Ierusalimschy
0ce3018109
'pushnum' pushes a "number" (float) + new C instruction 'pushint'
2013-05-07 16:01:16 -03:00
Roberto Ierusalimschy
0233ce0815
new function 'math.numbits' (not a final decision)
2013-05-06 14:22:55 -03:00
Roberto Ierusalimschy
1f2b82bf25
correct way to avoid compile-time errors in integer divisions
2013-05-06 14:22:16 -03:00
Roberto Ierusalimschy
f2043b7a58
correct error message for conversion errors from float to int
2013-05-06 14:21:59 -03:00
Roberto Ierusalimschy
2b1c2c61b0
bug: Wrong assert when reporting concatenation errors.
2013-05-06 14:21:28 -03:00
Roberto Ierusalimschy
fa6ea831b3
macro 'nvalue' removed (direct conversion from integer to double,
...
without an intermediate variable, can cause "excessive precision"
2013-05-06 14:17:09 -03:00
Roberto Ierusalimschy
b22a4280c6
macro 'nvalue' removed + cast to void added to avoid warnings
...
with 'clang'
2013-05-06 14:17:09 -03:00
Roberto Ierusalimschy
29fe3abda2
new function 'math.isfloat'
2013-05-02 14:31:54 -03:00
Roberto Ierusalimschy
6347004be9
stack overflow in vararg functions + garbage collector in recursive loops
2013-05-02 13:13:27 -03:00
Roberto Ierusalimschy
67532d5a10
constant folding and API arithmetic with integers
2013-05-02 09:37:24 -03:00
Roberto Ierusalimschy
6920a7f2e3
new macro 'intop' (to perform integer arithmetic on unsigned types)
2013-05-02 09:31:26 -03:00
Roberto Ierusalimschy
88bf2f83c0
new function 'tointeger' + 'luaV_arith' replaced by 'luaT_trybinTM'
2013-04-29 14:12:50 -03:00
Roberto Ierusalimschy
8fff05f6d0
integer division operates only on integers
2013-04-29 14:12:12 -03:00
Roberto Ierusalimschy
9b9becf384
added 'const' to parameters of 'luaG_concaterror'
2013-04-29 13:58:10 -03:00
Roberto Ierusalimschy
00744a2729
'luaO_arith' -> 'luaO_numarith'
2013-04-29 13:57:48 -03:00
Roberto Ierusalimschy
b4be507578
new function 'luaT_trybinTM'
2013-04-29 13:56:50 -03:00
Roberto Ierusalimschy
360587f319
favoring 'tonumber' over 'nvalue'
2013-04-26 16:51:17 -03:00
Roberto Ierusalimschy
eee51492e2
dumping and undumping integers
2013-04-26 15:48:35 -03:00
Roberto Ierusalimschy
c37b7b3cca
bug: garbage collector can trigger too many times in recursive loops,
...
because it was not computing the size of CallInfo structures in threads
2013-04-26 15:26:49 -03:00
Roberto Ierusalimschy
f79584faca
detail
2013-04-26 13:06:53 -03:00
Roberto Ierusalimschy
4abe99dc34
new interface for 'tonumber'
2013-04-26 13:03:50 -03:00
Roberto Ierusalimschy
d4e6b75098
"integer" keys in tables are now lua_Integer, not 'int'.
2013-04-26 12:39:25 -03:00
Roberto Ierusalimschy
a2f5c28a80
new operation '//' (integer division)
2013-04-26 10:08:29 -03:00
Roberto Ierusalimschy
a80a2b5e56
new cast macros for lua_Integer and lua_Unsigned
2013-04-25 18:15:37 -03:00
Roberto Ierusalimschy
bb1851ce98
'for' loop uses integers when possible
2013-04-25 16:50:02 -03:00
Roberto Ierusalimschy
5951c79ae1
default increment for 'for' loop is an integer (1, not 1.0)
2013-04-25 16:35:19 -03:00
Roberto Ierusalimschy
e381c582de
integer handling for order comparisons, power, and modulo operations
2013-04-25 16:12:41 -03:00
Roberto Ierusalimschy
9600c60df3
functions 'get_equalTM' and 'call_orderTM' moved to other files
...
to make 'lvm.c' smaller
2013-04-25 13:07:52 -03:00
Roberto Ierusalimschy
32bf6c9b27
functions 'traceexec', 'callTM', and 'call_binTM' moved to other
...
files to make 'lvm.c' a little smaller
2013-04-25 12:59:42 -03:00
Roberto Ierusalimschy
9c43d6a24e
new format "%I" in 'lua_pushfstring' for lua_Integer
2013-04-25 10:53:13 -03:00
Roberto Ierusalimschy
01b6fe0cbf
new API function 'lua_isinteger'
2013-04-25 10:52:49 -03:00
Roberto Ierusalimschy
944709c77b
more definitions to support integer formatting
2013-04-25 10:52:13 -03:00
Roberto Ierusalimschy
52cb90ec75
detail
2013-04-24 16:41:48 -03:00
Roberto Ierusalimschy
fa3b126a23
BUG: stack overflow in vararg functions with many fixed
...
parameters called with few arguments
2013-04-19 18:05:04 -03:00
Roberto Ierusalimschy
1294b09d8e
first implementation of literal integers (no constant folding yet)
2013-04-16 15:46:28 -03:00
Roberto Ierusalimschy
d4f0c4435d
a few more operations supporting integers (minus, umin, mult)
2013-04-16 15:43:05 -03:00
Roberto Ierusalimschy
44358e0206
extra trim applied to 'replace' argument (in case lua_Unsigned is
...
larger than 32 bits)
2013-04-16 15:39:37 -03:00
Roberto Ierusalimschy
07f861385e
first steps in the support of integers: basic representation + table indexing + basic API ops (tointeger/pushinteger) + equality + a few extra stuff
2013-04-15 12:44:46 -03:00
Roberto Ierusalimschy
7a543cfae6
2013-04-15 12:43:34 -03:00
Roberto Ierusalimschy
24689927f2
dependencies updated (with 'gcc -MM')
2013-04-15 11:13:38 -03:00
Roberto Ierusalimschy
8f8665fffa
'ttypenv' -> 'ttnov'
2013-04-12 16:07:09 -03:00
Roberto Ierusalimschy
49c1607157
_FILE_OFFSET_BITS usually also needs _LARGEFILE_SOURCE + easier to
...
use default definition for 'l_fseek' in ansi systems
2013-04-11 15:34:06 -03:00
Roberto Ierusalimschy
c8e96d6e91
logic for checking mode for 'fopen' moved to macro 'lua_checkmode'
2013-03-21 10:57:27 -03:00
Roberto Ierusalimschy
af8efcc762
detail (avoid unnecessary "unconst" in cast)
2013-03-21 10:54:57 -03:00
Roberto Ierusalimschy
3f6f78ea0b
detail (error message)
2013-03-20 16:40:07 -03:00
Roberto Ierusalimschy
e3a7104b40
detail (avoiding warnings)
2013-03-19 10:19:12 -03:00
Roberto Ierusalimschy
76492b4bb2
macro 'lua_checkmode' + typos in comments
2013-03-16 18:10:18 -03:00
Roberto Ierusalimschy
75250a237c
typos in comments
2013-03-16 18:10:18 -03:00
Roberto Ierusalimschy
437a49be5e
cast to avoid warnings
2013-03-15 15:33:36 -03:00
Roberto Ierusalimschy
4f0c716c8e
added two more commented warning options (just to know about them)
2013-03-15 11:00:08 -03:00
Roberto Ierusalimschy
70b0ee6310
export 'lua_ident' to avoid it being removed by C++ linker
2013-03-15 10:04:22 -03:00
Roberto Ierusalimschy
8830901a9c
second parameter to 'ldexp' is an integer
2013-03-07 15:21:32 -03:00
Roberto Ierusalimschy
15a3738b49
no need to handle 0 as a special case in 'table.remove'
2013-03-07 15:17:24 -03:00
Roberto Ierusalimschy
a83ed55f1e
added 'return' (when possible) to calls to error functions
2013-02-21 10:44:53 -03:00
Roberto Ierusalimschy
b559aed2d3
'l_tg' was renamed to 'l_mathop' and this use was not corrected at
...
the time
2013-02-20 11:08:56 -03:00
Roberto Ierusalimschy
d0c038da07
typo in comment
2013-02-20 11:08:21 -03:00
Roberto Ierusalimschy
db424053e8
new release number + copyright year
2013-02-19 15:39:04 -03:00
Roberto Ierusalimschy
ad56721948
details (5.2 corrected to 5.2.0)
2013-02-07 13:57:47 -02:00
Roberto Ierusalimschy
f4e762f688
better error checking for 'table.insert' and 'table.remove'
2013-02-06 16:29:03 -02:00
Roberto Ierusalimschy
1ce57628b2
comments
2013-02-06 11:37:39 -02:00
Roberto Ierusalimschy
181a837cac
small improvement in the support of 'float' as lua_Number
2013-01-29 14:00:40 -02:00
Roberto Ierusalimschy
0730a56d38
detail
2013-01-08 12:06:55 -02:00
Roberto Ierusalimschy
eecc1491f3
added some comments
2012-12-05 17:57:00 -02:00
Roberto Ierusalimschy
7ea68d84c4
added comment
2012-12-05 17:49:55 -02:00
Roberto Ierusalimschy
0e9167bc72
missing brackets in 'if' body (no bug, only 'luaC_checkfinalizer' is
...
called to do nothing)
2012-12-05 17:09:23 -02:00
Roberto Ierusalimschy
65e31fb179
Bug: load/loadfile returns wrong result when given an environment
...
for a binary chunk with no upvalues
2012-12-03 18:18:02 -02:00
Roberto Ierusalimschy
f993771c70
avoids warning with 'clang' + comment explaining macro
2012-11-14 15:21:34 -02:00
Roberto Ierusalimschy
52f9ccd298
removed unreacheable 'lua_unlock'
2012-11-04 18:08:17 -02:00
Roberto Ierusalimschy
a799ed5af9
more precise control for GC pause (based on threshold)
2012-10-19 16:00:33 -03:00
Roberto Ierusalimschy
4082c77ff2
error message for 'bad self' includes original 'extramsg'
2012-10-19 12:55:01 -03:00
Roberto Ierusalimschy
bc84180d12
error message in 'os.rename' does not include file name, because error
...
may be caused both by 'fromname' or 'toname'
2012-10-19 12:54:02 -03:00
Roberto Ierusalimschy
ad5da6ba14
API functions get acceptable indices except when not possible (when
...
they modify the value at that index) + new macro 'ispseudo' +
specific test 'api_checkstackindex'
2012-10-19 12:52:46 -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
fdae4b9453
removed commented-out line (for debugging)
2012-10-03 09:36:17 -03:00
Roberto Ierusalimschy
84b6581287
cast to avoid warning in some compilers (size_t x unsigned int)
2012-10-02 14:41:50 -03:00
Roberto Ierusalimschy
c6b6024a9d
cast in 'luai_makeseed' now casts to needed type
2012-10-02 14:40:53 -03:00
Roberto Ierusalimschy
d58ce8106e
macro 'lua_number2unsigned' also needs proper definition if
...
lua_Number is float
2012-10-02 14:32:44 -03:00
Roberto Ierusalimschy
31f7d553e4
LUA_CORE condition removed from definition of some 'tricks' (as it
...
controlled only a few other defines) + MS_ASMTRICK renamed to
LUA_MSASMTRICK
2012-10-01 11:14:45 -03:00
Roberto Ierusalimschy
adaba04059
'pcall' may not restore previous error function when
...
inside coroutines + Check for garbage collector in function calls
does not cover all paths
2012-10-01 11:05:31 -03:00
Roberto Ierusalimschy
b157f3546e
BUG: 'pcall' may not restore previous error function when
...
inside coroutines
2012-10-01 11:05:04 -03:00
Roberto Ierusalimschy
ab7086e209
pops the string from 'get_prompt' only after using it
2012-09-29 17:07:06 -03:00
Roberto Ierusalimschy
7a3de1aba3
typo in comment
2012-09-24 19:57:26 -03:00
Roberto Ierusalimschy
8287a0db55
detail
2012-09-11 16:37:16 -03:00
Roberto Ierusalimschy
cf160abcf9
no more macro 'changenvalue'
2012-09-11 15:21:44 -03:00
Roberto Ierusalimschy
ae1d318822
small bug: generational mode is always in 'propagate' mode only
...
outside the collector: during collection of course it must go to
other modes.
2012-09-11 09:53:08 -03:00
Roberto Ierusalimschy
2038073975
more regularity for field 'fix'
2012-09-11 09:42:14 -03:00
Roberto Ierusalimschy
2dc91ca5ee
checks garbage collector every time it calls a function (as the
...
stack can grow and so allocates more memory)
2012-08-28 15:30:45 -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
c1a2a646c8
details (no need to use lua_pushfstring for plain strings)
2012-08-16 14:32:20 -03:00
Roberto Ierusalimschy
53480f1163
details (remove of some extra spaces)
2012-08-14 15:12:34 -03:00
Roberto Ierusalimschy
233eac4d3a
detail (avoid being picky about conversion from 'unsigned char'
...
to 'int')
2012-08-06 10:36:34 -03:00
Roberto Ierusalimschy
6625cbecd1
Bug: Some patterns can overflow the C stack, due to recursion
...
(Took the opportunity to refactor function 'match')
2012-07-31 14:48:42 -03:00
Roberto Ierusalimschy
4ac55997ec
typo
2012-07-13 11:54:14 -03:00
Roberto Ierusalimschy
763f84c84c
Some patterns can overflow the C stack, due to recursion.
2012-07-13 11:53:38 -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
4fc15bbfb7
major collections in generational mode are triggered by comparison with
...
the memory estimate from last major collection
2012-07-02 10:40:05 -03:00
Roberto Ierusalimschy
f7ec36ab16
comment
2012-07-02 10:37:04 -03:00
Roberto Ierusalimschy
b926472312
change in error message
2012-06-29 16:23:33 -03:00
Roberto Ierusalimschy
78d9865900
bugs: Internal Lua values may escape through the debug API +
...
Problems when yielding from debug hooks
2012-06-11 14:49:37 -03:00
Roberto Ierusalimschy
cc2a60ecb7
bugs in yields inside debug hooks
2012-06-08 12:14:04 -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
c510d94549
includes counts from 'sweeptolive' in cost of atomic step
2012-05-31 18:28:59 -03:00
Roberto Ierusalimschy
4dd0622d0c
bug in luaL_getsubtable (calling lua_absindex not with original stack)
2012-05-31 17:28:45 -03:00
Roberto Ierusalimschy
ab2c3d5cde
small bug in error handling of finalizers (cannot call lua_tostring
...
inside the core) + small bug in luaC_checkfinalizer (when avoiding
remove object being sweeped from sweep list) + small changes in GC
pace control (for the atomic part)
2012-05-31 17:26:14 -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
6fcdfc6d4f
bug: object being moved to 'finobj' list might not be sweeped by
...
the collector
2012-05-30 13:01:10 -03:00
Roberto Ierusalimschy
b77a90681e
typos in comments
2012-05-30 09:33:44 -03:00
Roberto Ierusalimschy
6efffb9acd
only count in 'atomic' objects marked for the first time
2012-05-29 14:52:17 -03:00
Roberto Ierusalimschy
51e8f08e60
more efficient way to apply 'stepmul' + some changes in GC parameters
2012-05-28 17:41:00 -03:00
Roberto Ierusalimschy
5adb5a4812
definition for 'MAX_LMEM'
2012-05-28 17:32:28 -03:00
Roberto Ierusalimschy
e29f3a5751
definition of 'GCSTEPSIZE' moved to header file + small changes
2012-05-23 12:43:14 -03:00
Roberto Ierusalimschy
21ed264a38
compensate for 'GCSTEPSIZE' in GC steps
2012-05-23 12:42:27 -03:00
Roberto Ierusalimschy
e131eb0d9a
removed debug code
2012-05-23 12:41:53 -03:00
Roberto Ierusalimschy
054c20cd5b
spaces -> tabs in #defines
2012-05-23 12:37:09 -03:00
Roberto Ierusalimschy
8e7149f496
detail ('char' should be 'const char')
2012-05-22 15:38:56 -03:00
Roberto Ierusalimschy
086da10dac
merge of fields 'lastmajormem' (used in gen. mode) and 'estimate'
...
(used in inc. mode)
2012-05-22 14:50:39 -03:00
Roberto Ierusalimschy
b36b4b521f
try to avoid sweeping new objects created with new white (and
...
therefore not collectable in the current cycle)
2012-05-22 14:32:25 -03:00
Roberto Ierusalimschy
398811a313
simpler macro 'luaC_condGC' + better 'step' in 'lua_gc' +
...
micro bug in 'luaC_checkfinalizer' (current sweep object could be
removed from 'allgc' list)
2012-05-21 10:18:10 -03:00
Roberto Ierusalimschy
2a66b34f72
revamp of the GC pace control; more like 5.1: any X Kbytes allocated
...
makes the GC handle f(X) Kbytes of objects
2012-05-20 17:36:44 -03:00
Roberto Ierusalimschy
8d0e1ed52f
extend optimization of 'if a then break end' for the case
...
'if a then break; end'
2012-05-20 11:51:23 -03:00
Roberto Ierusalimschy
3ac595da8a
allow "long double" precision for PI constant if needed
2012-05-18 14:47:53 -03:00
Roberto Ierusalimschy
ea980fdeef
removed 'stringmark' trick
2012-05-14 14:52:56 -03:00
Roberto Ierusalimschy
5654763797
macro 'checkGC' takes care of setting 'top' to limit stack live values
2012-05-14 14:50:49 -03:00
Roberto Ierusalimschy
edfa9e007d
details (header comments)
2012-05-14 10:34:18 -03:00
Roberto Ierusalimschy
31829ad177
test for whether collector is running moved from function to
...
macro 'luaC_condGC'.
2012-05-11 16:22:33 -03:00
Roberto Ierusalimschy
c2361e0b61
definition for 'LUAI_MAXSHORTLEN' moved to luaconf.h (too important)
2012-05-11 11:14:42 -03:00
Roberto Ierusalimschy
77cbd817d1
better(?) handling of '#define's for IEEE-related tricks + avoid using
...
IEEE trick for 64-bit integer types (lua_Integer on 64-bit machines)
2012-05-11 11:10:50 -03:00
Roberto Ierusalimschy
4ec7d6de95
bug: wrong handling of 'nCcalls' in coroutines
2012-05-11 11:10:28 -03:00
Roberto Ierusalimschy
f6a12948ca
useless parameter in macro 'luai_makeseed'
2012-05-11 11:06:07 -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
bb1146dc39
wrong error message when 'coroutine.create' or 'coroutine.wrap' are
...
called with no arguments (new thread is assumed to be the missing
argument).
2012-04-27 15:59:04 -03:00
Roberto Ierusalimschy
fc24a3a6c4
small bug: a reader function should not modify the Lua stack
2012-04-27 11:13:19 -03:00
Roberto Ierusalimschy
a94ce68e0a
bug: wrong handling of 'nCcalls' in coroutines
2012-04-26 17:41:18 -03:00
Roberto Ierusalimschy
ec22fc963a
detail (separate code to create 'searchers' table into a new function)
2012-04-26 16:38:52 -03:00
Roberto Ierusalimschy
c54f5f64c9
primaryexp -> suffixedexp; prefixexp -> primaryexp + more 'syntactical'
...
way to distinguish between function calls and assignments
2012-04-20 16:20:05 -03:00
Roberto Ierusalimschy
4cca1a436d
details (using lua_setglobal/lua_getglobal instead of explicit
...
use of the global table)
2012-04-20 14:05:17 -03:00
Roberto Ierusalimschy
8df0198178
release 5.2.1
2012-04-20 10:18:26 -03:00
Roberto Ierusalimschy
048be9cf27
different scheme to check arguments to '%d', '%x', etc. Old scheme
...
did not work well when lua_Number is an integer.
2012-04-20 10:16:48 -03:00
Roberto Ierusalimschy
1485ea2ee7
Finalizers may call functions from a dynamic library after
...
the library has been unloaded
2012-04-12 13:25:25 -03:00
Roberto Ierusalimschy
b10dbe5c72
bug: C libraries must be unloaded after all other finalizers have run,
...
because a finalizer may use a C function from a C library
2012-04-11 13:35:32 -03:00
Roberto Ierusalimschy
462375ba47
'if' to avoid empty 'memcpy' (may be expensive)
2012-04-03 16:06:19 -03:00
Roberto Ierusalimschy
cfbe2333a4
string hash may not use all bytes (but this is configurable now) +
...
small other changes
2012-03-28 15:28:25 -03:00
Roberto Ierusalimschy
afc3fcf952
definition for 'LUA_MAXSHORTLEN' moved to 'lstring.c' (used only there)
2012-03-28 15:27:25 -03:00
Roberto Ierusalimschy
99bd1a000f
error function can be 'l_noret'
2012-03-19 19:58:09 -03:00
Roberto Ierusalimschy
3e66d3b4be
cleaner code (avoids loop with empty body)
2012-03-19 19:57:14 -03:00
Roberto Ierusalimschy
29a28693e5
'luaL_checkversion' called by 'luaL_setfuncs'
2012-03-18 13:52:49 -03:00
Roberto Ierusalimschy
678c1255c9
random seed used in the hash of all strings to avoid intentional
...
collisions
2012-02-01 19:57:15 -02:00
Roberto Ierusalimschy
a4b96ce9a3
first implementation of long strings
2012-01-25 19:05:40 -02:00
Roberto Ierusalimschy
291f564485
field 'reserved' -> 'extra' (may be used for other purposes too)
2012-01-23 21:05:51 -02:00
Roberto Ierusalimschy
9f1a8dbdd3
'eqstr' -> 'luaS_eqstr'
2012-01-23 21:05:18 -02:00
Roberto Ierusalimschy
d19f1da6ef
new macro 'isreserved' + 'eqstr' -> 'luaS_eqstr' (may be a function)
2012-01-23 21:04:07 -02:00
Roberto Ierusalimschy
f88806a1fb
"default: lua_assert(0)" in switches helps debugging + uses
...
non-variant types in binary files
2012-01-23 21:02:10 -02:00
Roberto Ierusalimschy
fb6eee2805
Lua never uses Ã'assert' (it is always 'lua_assert')
2012-01-23 20:59:02 -02:00
Roberto Ierusalimschy
0010ec68b1
documentation comment (small correction about strings being
...
gray)
2012-01-23 18:29:12 -02:00
Roberto Ierusalimschy
28f8ed9113
new macro 'checktype'
2012-01-20 20:47:11 -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
76eab106df
bug: Lexical gets confused with some combination of arithmetic
...
operators and hexadecimal numbers
2012-01-20 16:35:36 -02:00
Roberto Ierusalimschy
81ed85ecfb
BUG: memory hoarding when creating Lua hooks for coroutines
...
BUG: Lexical gets confused with some combination of arithmetic
operators and hexadecimal numbers
2012-01-20 16:32:13 -02:00
Roberto Ierusalimschy
7dcc02b165
BUG: coroutine hooks were not collected together with coroutine
2012-01-19 18:14:44 -02:00
Roberto Ierusalimschy
e2fc2ce8df
new way to handle -E option (write a mark in the registry to avoid
...
reading environment variables)
2011-12-12 14:34:03 -02:00
Roberto Ierusalimschy
a241b6cb3c
removed redundant definition for FILEHANDLE
2011-12-08 10:11:37 -02:00
Roberto Ierusalimschy
f0d143f30f
avoid a few warnings (casts)
2011-12-07 16:03:47 -02:00
Roberto Ierusalimschy
c82087b8dd
cast from 'bool' to 'int' (for C++)
2011-12-07 12:43:55 -02:00
Roberto Ierusalimschy
138be5b843
no more explicit support for 'luaall_c': unifying file can do
...
the work
2011-12-06 14:58:36 -02:00
Roberto Ierusalimschy
e320b5b672
small bug: format '%d' for lua_Number argument
2011-12-06 14:33:55 -02:00
Roberto Ierusalimschy
ca9c405fef
some compilers (e.g., gcc C++) do not accept NULL as a pointer in
...
that context
2011-12-02 11:26:54 -02:00
Roberto Ierusalimschy
e2feb886d6
macro 'luaL_getmetatable' seems more appropriate when getting
...
metatables in registry
2011-12-02 11:25:57 -02:00
Roberto Ierusalimschy
5999e14ad9
old error messages may be misleading
2011-12-02 11:23:56 -02:00
Roberto Ierusalimschy
01747f2c24
error message: "tag method" -> "metamethod"
2011-12-02 11:18:41 -02:00
Roberto Ierusalimschy
7377fbdebc
function prototype did not match one in .h
2011-11-30 17:30:16 -02:00
Roberto Ierusalimschy
f1d2ac3a98
allow non-integer arguments to integer formats (%d, %x, etc.),
...
but check range
2011-11-30 16:24:56 -02:00
Roberto Ierusalimschy
c5da4f4cd0
unused variable removed
2011-11-30 11:03:24 -02:00
Roberto Ierusalimschy
7bcb2462e4
comments
2011-11-30 10:58:57 -02:00
Roberto Ierusalimschy
0bd99b327b
avoid "unreachable" 'break'
2011-11-30 10:44:26 -02:00
Roberto Ierusalimschy
6d8b672094
more uses of 'l_noret'
2011-11-30 10:43:51 -02:00
Roberto Ierusalimschy
e21b26a964
avoid 'return' "to avoid warnings"
2011-11-30 10:42:49 -02:00
Roberto Ierusalimschy
0f388193b3
'lUA' -> 'LUA'
2011-11-30 10:35:05 -02:00
Roberto Ierusalimschy
7948b8568e
when available, use '*_r' versions of 'gmtime' and 'localtime'
2011-11-29 15:15:42 -02:00
Roberto Ierusalimschy
61b1d9a466
another try to avoid warnings about unreachable 'return' after 'exit'
2011-11-29 13:55:51 -02:00
Roberto Ierusalimschy
3617e04e97
'lua_load' has an extra argument 'mode'
2011-11-29 13:55:08 -02:00
Roberto Ierusalimschy
8c62bde36f
comment
2011-11-29 13:54:38 -02:00
Roberto Ierusalimschy
51650eac78
small change to avoid warnings of non-specified order of access
...
to volatile fields
2011-11-29 13:39:48 -02:00
Roberto Ierusalimschy
aea68e5c54
explicit option RTLD_LOCAL instead of 0 (Posix does not fix
...
a default for dlopen)
2011-11-28 15:27:51 -02:00
Roberto Ierusalimschy
ece042fef0
'table.pack' does not return 'n' (may be confusing when
...
using table.pack as last argument in a call)
2011-11-28 15:26:30 -02:00
Roberto Ierusalimschy
217b65e6d9
avoid some warnings about converting 32-bit shifts into 64-bit results
2011-11-28 15:25:48 -02:00
Roberto Ierusalimschy
8119374e74
avoid warnings of unreacheable 'break's
2011-11-28 15:25:16 -02:00
Roberto Ierusalimschy
3a997eefb5
MS_ASMTRICK is only valid on MS compilers (not any Windows compiler)
2011-11-25 10:52:27 -02:00
Roberto Ierusalimschy
5184ff2096
'LUA_DL_DLL' is not yet defined before the inclusion of 'lua.h'
2011-11-25 10:52:03 -02:00
Roberto Ierusalimschy
b0cbe77816
'_fseeki64' and family not available in all Windows platforms
2011-11-25 10:50:03 -02:00
Roberto Ierusalimschy
6e899850b9
details
2011-11-24 11:25:41 -02:00
Roberto Ierusalimschy
fded7bef19
options for 'collectgarbage' renamed: "inc" -> "incremental";
...
"gen" -> "generational"
2011-11-23 15:29:04 -02:00
Roberto Ierusalimschy
b5d7255034
small changes to avoid some warnings
2011-11-16 16:51:36 -02:00
Roberto Ierusalimschy
6cce5c0601
new function 'luaL_loadfilex'
2011-11-14 15:10:24 -02:00
Roberto Ierusalimschy
eb70f58279
'luaIO_Stream' -> 'luaL_Stream'
2011-11-14 14:55:35 -02:00
Roberto Ierusalimschy
ef900f224c
strutcture for file handles exported in 'lauxlib.h'
2011-11-11 17:59:17 -02:00
Roberto Ierusalimschy
3105febf9a
using Lua buffers to build error messages
2011-11-10 09:42:58 -02:00
Roberto Ierusalimschy
7133e20c94
make treatment of 'pcall' and 'xpcall' more similar
2011-11-09 17:38:00 -02:00
Roberto Ierusalimschy
888d39ea75
refactoring of common parts of 'pcall' and 'xpcall' + avoids
...
stack errors on these functions (return error code instead)
2011-11-09 17:28:27 -02:00
Roberto Ierusalimschy
eef22fa4ce
create error messages with a single concat, to avoid problems with
...
creating strings piecemeal
2011-11-09 17:11:20 -02:00
Roberto Ierusalimschy
eda87f1156
in 'luaL_checkstack', include extra stack space in test to allow
...
correct execution of error routines, if necessary
2011-11-09 17:08:55 -02:00
Roberto Ierusalimschy
e0e406ead3
extra argument to instruction 'checkstack' (in 'testC')
2011-11-09 17:08:07 -02:00
Roberto Ierusalimschy
30cea671a7
configurable 'directory separator' in 'package.searchpath'
2011-11-09 13:18:04 -02:00
Roberto Ierusalimschy
a716ae1f50
avoids including 'stdio.h' everywhere (because of definitions for
...
luai_writestring/luai_writeline)
2011-11-09 12:47:14 -02:00
Roberto Ierusalimschy
ea382b0be1
small bug: error message in 'io.lines' is not the error number
2011-11-09 12:10:43 -02:00
Roberto Ierusalimschy
6d8d282e0f
avoid calling "extra value" as if it were a function option
2011-11-06 11:59:12 -02:00
Roberto Ierusalimschy
00c8a17a2d
by default, do not use Windows' goodies in Windows CE build
2011-11-05 13:29:05 -02:00
Roberto Ierusalimschy
166ce15512
cannot apply macro 'getstr' over NULL
2011-10-31 15:48:51 -02:00
Roberto Ierusalimschy
87cf2bf711
extra comments about what fields are optional debug information
2011-10-31 15:48:22 -02:00
Roberto Ierusalimschy
fd8a849621
detail (avoid applying macro 'getstr' with a function-call argument)
2011-10-31 15:46:04 -02:00
Roberto Ierusalimschy
5a568a3b01
detail (comment)
2011-10-25 10:01:20 -02:00
Roberto Ierusalimschy
475e6c5352
'lua_setglobal/lua_getglobal' implemented as functions to avoid
...
problems with stack indices
(e.g., lua_getglobal(L, lua_tostring(L, -1)) )
2011-10-24 14:53:05 -02:00
Roberto Ierusalimschy
af00a0772c
new functions lua_rawsetp/lua_rawgetp
2011-10-24 12:54:05 -02:00
Roberto Ierusalimschy
6819c2a98a
silly bug in 5.2 beta: assignment conflict code did not test to check
...
whether variable was a table element
2011-10-24 12:51:44 -02:00
Roberto Ierusalimschy
1dd8af67b6
BUG: parser may collect a prototype while building it.
2011-10-21 17:34:23 -02:00
Roberto Ierusalimschy
1350a2bcb5
more macros to try to make NaN trick work with other sizes of
...
IEEE float numbers. (It has not been tested with such different
sizes...)
2011-10-17 12:46:13 -02:00
Roberto Ierusalimschy
217e67cb22
new type 'l_noret' for function that do not return
2011-10-07 17:45:19 -03:00
Roberto Ierusalimschy
9bbfe9f3fd
avoid the word 'TRICKLE' in macro name (as it has nothing to do
...
with its meaning)
2011-10-07 16:53:05 -03:00
Roberto Ierusalimschy
788a0ecd27
'luaC_separateudata' renamed to 'separatetobefnz' and called only
...
from 'lgc.c'
2011-10-03 14:54:25 -03:00
Roberto Ierusalimschy
6d86b937e4
'luaC_separateudata' called from 'luaC_freeallobjects' + removed
...
extra 'luaF_close' (already being called by 'close_state')
2011-10-03 14:54:25 -03:00
Roberto Ierusalimschy
bc90cf4b83
retraverse all gray lists together to avoid traversing some weak
...
tables twice (as they may change lists when traversed)
2011-10-03 13:22:05 -03:00
Roberto Ierusalimschy
d79190e27f
missing 'LUA_CORE' definition
2011-10-03 13:19:23 -03:00
Roberto Ierusalimschy
9caf5b4f79
lint (unused definition)
2011-09-30 09:46:06 -03:00
Roberto Ierusalimschy
50cddefeeb
lint (wrong identation)
2011-09-30 09:45:45 -03:00
Roberto Ierusalimschy
e24f1ee9ff
lint (unreachable code)
2011-09-30 09:44:45 -03:00
Roberto Ierusalimschy
f3b0eb3ecf
lint (unused macros)
2011-09-30 09:44:19 -03:00
Roberto Ierusalimschy
162ce8256e
lint (unused struct field)
2011-09-30 09:43:54 -03:00
Roberto Ierusalimschy
ad90447eb6
detail: new macros for non-valid values
2011-09-26 17:17:27 -03:00
Roberto Ierusalimschy
87912786af
dead objects are not collectable.
2011-09-24 18:12:01 -03:00
Roberto Ierusalimschy
5645a84368
detail about 'trick' function (nil turn it off)
2011-09-24 18:11:29 -03:00
Roberto Ierusalimschy
95ed6c1127
better(?) scheme for cleaning weak tables; all ressurected objects
...
are removed from weak values before finalization
2011-09-24 18:00:40 -03:00
Roberto Ierusalimschy
12ab78aca6
detail in extra trace code: total bytes is given by 'gettotalbytes',
...
not by 'totalbytes' counter.
2011-09-20 16:25:23 -03:00
Roberto Ierusalimschy
45c346645c
avoid clearing ephemeron tables that have nothing to be cleaned
...
(no white elements)
2011-09-19 14:03:38 -03:00
Roberto Ierusalimschy
68ce878292
cannot compute 'mainposition' before checking whether key is nil
2011-09-15 14:09:02 -03:00
Roberto Ierusalimschy
500336efd0
small bug in if-goto optimization: block must be closed ('leaveblock')
...
*before* the jump out ('escapelist')
2011-09-14 14:40:26 -03:00
Roberto Ierusalimschy
5ea8f108e1
using 'long' versions of 'fseek'/'ftell' when available
2011-09-13 18:09:04 -03:00
Roberto Ierusalimschy
2275030b86
details (and missing 'break's)
2011-09-13 15:05:59 -03:00
Roberto Ierusalimschy
05de314701
upvalue names always can be NULL (if debug info was removed), so
...
always check for that case
2011-09-13 14:40:20 -03:00
Roberto Ierusalimschy
d281d23f8d
detail (make 'lua_assert' a valid expression even when turned off)
2011-09-13 14:39:23 -03:00
Roberto Ierusalimschy
ec431ce5db
comment
2011-09-12 17:33:03 -03:00
Roberto Ierusalimschy
c8f47c2934
optimization for |if cond then goto|
2011-08-30 13:38:58 -03:00
Roberto Ierusalimschy
ca458f1f52
'luaK_goiffalse' exported
2011-08-30 13:26:41 -03:00
Roberto Ierusalimschy
121dc8af66
cleaner code for 'if' construct
2011-08-25 10:45:24 -03:00
Roberto Ierusalimschy
a8675966ec
detail: centralize all tests for Windows on variable 'LUA_WIN'
2011-08-23 14:25:42 -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
8a008a2057
bug: __newindex metamethod may not work if metatable is its own
...
metatable.
2011-08-17 17:38:51 -03:00
Roberto Ierusalimschy
89b59eee73
bug: __newindex metamethod may not work if metatable is its own
...
metatable + luaV_settable does not create entry when there is a
metamethod (and therefore entry is useless)
2011-08-17 17:26:47 -03:00
Roberto Ierusalimschy
166dd0261a
new option '-E' to avoid environment variables
2011-08-17 17:19:52 -03:00
Roberto Ierusalimschy
51471ba748
comments about use of 'luaH_set'
2011-08-15 16:41:58 -03:00
Roberto Ierusalimschy
0b65cb74cd
new implementation for 'getobjname': first search for relevant
...
instruction (new function 'findsetreg') and then try to build
a meaningful name
2011-08-12 17:01:44 -03:00
Roberto Ierusalimschy
ea46b750dc
comment
2011-08-11 14:06:12 -03:00
Roberto Ierusalimschy
92afcf2823
no more 'luaH_setstr (used only once) + 'luaH_setint' receives value
...
to be set.
2011-08-09 17:58:29 -03:00
Roberto Ierusalimschy
b5bf7d9ef4
'string.format' checks whether values for integer formats are
...
actually integers
2011-08-09 17:58:29 -03:00
Roberto Ierusalimschy
6a5d89b39f
detail (using array instead of several variables to keep track of
...
enabled command-line options)
2011-08-04 15:16:16 -03:00
Roberto Ierusalimschy
ae14adc272
better error message when trying to open files
2011-08-02 15:00:01 -03:00
Roberto Ierusalimschy
ff98f17d27
detail: factoring in common code for opening files and checking for
...
errors
2011-07-28 15:41:15 -03:00
Roberto Ierusalimschy
59bcd137ae
reducing even more use of C stack by the parser: struct 'FuncState'
...
does not need field 'L' + number of labels/gotos in a chunk may be
limited to SHRT_MAX. (Also removed some non-needed 'unsigned's.)
2011-07-27 15:09:01 -03:00
Roberto Ierusalimschy
5ab6d36d99
no more field 'L' in 'FuncState'
2011-07-27 15:07:37 -03:00
Roberto Ierusalimschy
43c873895f
tonumber: base 10 is not special, no base is
2011-07-27 09:14:06 -03:00
Roberto Ierusalimschy
03a078493e
refuse things like 'inf' or 'Nan' as numerals
2011-07-27 09:13:08 -03:00
Roberto Ierusalimschy
bae57ea088
'M_IX86' -> '_M_IX86'
2011-07-25 14:20:47 -03:00
Roberto Ierusalimschy
2557107e91
removed unused variable 'found' (in 'findfield') + removed legacy
...
test for 'what' being "tail"
2011-07-25 14:18:49 -03:00
Roberto Ierusalimschy
32a12e2f3f
detail (cleaned whitespaces at end of lines)
2011-07-15 09:50:29 -03:00
Roberto Ierusalimschy
559bb554c9
no more 'zungetc' (better not to read next char)
2011-07-15 09:48:03 -03:00
Roberto Ierusalimschy
fd5e810e08
macro 'char2int' replaced by 'cast_uchar' (used by other files)
2011-07-15 09:35:32 -03:00
Roberto Ierusalimschy
067f761739
better code for numerical escapes
2011-07-15 09:30:41 -03:00
Roberto Ierusalimschy
7978a8d8b2
added '_M_IX86' in NaN trick
2011-07-08 17:07:11 -03:00
Roberto Ierusalimschy
32e09c2a16
detail
2011-07-08 17:01:38 -03:00
Roberto Ierusalimschy
df19931ddc
error on invalid escape sequences
2011-07-08 16:17:30 -03:00
Roberto Ierusalimschy
b5084fdafe
detail (comment)
2011-07-06 13:45:14 -03:00
Roberto Ierusalimschy
d8200d5f3c
'\*' -> '\z' + '\?' is not an official escape sequence
2011-07-05 16:13:45 -03:00
Roberto Ierusalimschy
79cbc3468c
removed and deprecated functions really removed from the code base
2011-07-05 09:49:35 -03:00
Roberto Ierusalimschy
9e89a55a4f
NILCONSTANT also depends no endianess (with NaN trick)
2011-07-04 17:29:02 -03:00
Roberto Ierusalimschy
b707e81c3d
comments about some compiler options that should be tested once in a while
2011-07-04 13:10:15 -03:00
Roberto Ierusalimschy
ee37ee50d6
'table.pack' also returns 'n' + 'deprecated' changed to 'removed'
2011-07-02 13:01:44 -03:00
Roberto Ierusalimschy
ad1a54b5c0
reordering of some defines (more logical grouping)
2011-07-02 13:00:15 -03:00
Roberto Ierusalimschy
88c29c0cd5
compilation warning about integer size x pointer size
2011-07-02 12:59:17 -03:00
Roberto Ierusalimschy
d93df22bf6
small simplifications (and assert was wrongly written)
2011-07-02 12:58:14 -03:00
Roberto Ierusalimschy
5017cc6ba2
simpler 'luai_apicheck' (and avoids compilation error...)
2011-07-02 12:57:25 -03:00
Roberto Ierusalimschy
2f125ebc33
'deprecated' x 'removed' (they are not the same thing)
2011-07-02 12:56:43 -03:00
Roberto Ierusalimschy
49a01c0991
'package.loaders' -> 'package.searchers'
2011-06-28 14:14:12 -03:00
Roberto Ierusalimschy
17526ed2fe
no more errors on accesses to 'string' and strings
2011-06-28 14:13:52 -03:00
Roberto Ierusalimschy
f180822fa6
back to internal table for 'ctype', no more locale manipulation
2011-06-28 12:42:04 -03:00
Roberto Ierusalimschy
594220c624
use standard "underscore + uppercases" for reserved keys in the registry
2011-06-27 16:42:31 -03:00
Roberto Ierusalimschy
3dd68624dc
comments
2011-06-27 15:27:18 -03:00
Roberto Ierusalimschy
f9eea453b7
avoid "magic constant" 32 (the difference from 'A' to 'a')
2011-06-27 15:22:46 -03:00
Roberto Ierusalimschy
374773748b
back to "one-label-per-block"
2011-06-27 15:18:59 -03:00
Roberto Ierusalimschy
29644366fc
useless assignments removed (macros already do the assignment)
2011-06-24 11:36:21 -03:00
Roberto Ierusalimschy
6eadedbfa1
resort to standard C ctype for non-ASCII systems + 'ltoupper' replaced
...
by 'ltolower'
2011-06-24 09:25:33 -03:00
Roberto Ierusalimschy
1978094b3a
resort to standard C ctype for non-ASCII systems
2011-06-24 09:25:33 -03:00
Roberto Ierusalimschy
5acc5b0c1e
using 'tolower' instead of 'toupper' (slightly simpler to implement)
2011-06-24 09:25:02 -03:00
Roberto Ierusalimschy
59547c6cda
macro 'ltoupper' instead of 'lisupper' (more usefull for Lua)
2011-06-23 13:01:06 -03:00
Roberto Ierusalimschy
3d3355b4f3
label syntax changed to '::label::'
2011-06-23 11:54:48 -03:00
Roberto Ierusalimschy
801f43f09a
change in the representation of file handles
2011-06-21 10:43:48 -03:00
Roberto Ierusalimschy
719c01359f
label syntax changed to '::label::'
2011-06-20 13:52:48 -03:00
Roberto Ierusalimschy
43f13729a2
comment
2011-06-20 13:50:59 -03:00
Roberto Ierusalimschy
136f8e148d
added cast to void to calls to 'setlocale' (to easy redefining it as
...
a constant)
2011-06-20 13:36:03 -03:00
Roberto Ierusalimschy
f90a130b07
typo in message
2011-06-20 13:35:23 -03:00
Roberto Ierusalimschy
cb4950a6d8
parser must work with C locale, but external locale must be preserved
2011-06-18 14:08:58 -03:00
Roberto Ierusalimschy
fdede85419
label names must be unique inside a function
2011-06-16 13:36:39 -03:00
Roberto Ierusalimschy
beab626061
correct length for LUA_COPYRIGHT (without trailing '\0')
2011-06-16 11:30:58 -03:00
Roberto Ierusalimschy
817f8674af
avoid warning about -unsigned value
2011-06-16 11:14:31 -03:00
Roberto Ierusalimschy
cf0562e1e7
detail (missing cast to unsigned char when converting char to int)
2011-06-16 11:13:22 -03:00
Roberto Ierusalimschy
22e1c5ebad
avoid conversion from 'const char*' to 'void *' (warning about 'const')
2011-06-16 11:12:24 -03:00
Roberto Ierusalimschy
470dd56a89
'os.execute' (and similars) should return 'exit' and code in case
...
of success, too.
2011-06-16 11:11:04 -03:00
Roberto Ierusalimschy
20d30bcd33
declarations should be present only when implementations are
2011-06-16 11:10:12 -03:00
Roberto Ierusalimschy
44b6f496b5
just in case, avoid side effects in 'ctype' macros
2011-06-15 11:35:55 -03:00
Roberto Ierusalimschy
fd80e63468
configuration for NaN trick big-endian + macro 'luai_checknum' to
...
ensure numbers comming from C are not "improper" (some kinds of
signaling NaNs)
2011-06-13 11:13:06 -03:00
Roberto Ierusalimschy
f62565abea
avoid warnings with -Wstrict-overflow
2011-06-09 15:24:22 -03:00
Roberto Ierusalimschy
c9d1d9f9c6
better way to test overflows with string indices
2011-06-09 15:22:47 -03:00
Roberto Ierusalimschy
35391d9b1a
macro 'NNMARK' (mark for non-number values using the NaN trick)
2011-06-09 15:21:25 -03:00
Roberto Ierusalimschy
99b1b8e918
first version with 'NANTRICK' (packing all Lua values inside a 'double')
2011-06-07 16:02:33 -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
0214dab989
yet another macro ('num_')
2011-05-31 16:15:01 -03:00
Roberto Ierusalimschy
821bd7025e
more uniform names for 'equalobj'-related functions
2011-05-31 15:27:56 -03:00
Roberto Ierusalimschy
9b7dddad7d
no need for two different implementations for equality (one raw and
...
one with metamethods)
2011-05-31 15:24:36 -03:00
Roberto Ierusalimschy
3f04a9f2c0
code is simpler without 'goto' here
2011-05-30 13:36:38 -03:00
Roberto Ierusalimschy
2a59a999d4
yet another macro abstracting TValue representation
2011-05-26 14:12:31 -03:00
Roberto Ierusalimschy
ee7d0c2649
new macro 'luai_writeline' to print newlines (and flush 'stdout')
2011-05-26 13:09: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
6c8a32217a
changes by lhf (better control of chars x bytes)
2011-05-17 09:42:43 -03:00
Roberto Ierusalimschy
cb09f4fef4
details
2011-05-06 13:00:23 -03:00
Roberto Ierusalimschy
3cf1729a02
new macro 'lua_longassert' that is equivalent to an assertion without
...
a stringfication of the condition, to avoid too long string literals
(limited by C90 to ~510 characters)
2011-05-05 16:43:14 -03:00
Roberto Ierusalimschy
74b0bb3a45
macro 'checkconsistency' moved to this file, as it is used only
...
here
2011-05-05 16:42:25 -03:00
Roberto Ierusalimschy
e4076fe6d9
break long assertion in two shorter ones
2011-05-05 13:18:53 -03:00
Roberto Ierusalimschy
81952e6884
avoid using expression as argument to unsafe macro 'l_isfalse'
2011-05-05 13:16:33 -03:00
Roberto Ierusalimschy
25b4e35ee8
new macros abstracting TValue representation (to easy change to
...
other representations)
2011-05-05 12:53:23 -03:00
Roberto Ierusalimschy
7e1facaa4e
detail in assertion
2011-05-04 14:04:06 -03:00
Roberto Ierusalimschy
ad2531a0ee
more complete (and hopefuly more correct) handling of 'sizeof(char)'
2011-05-03 13:01:57 -03:00
Roberto Ierusalimschy
bc1c718cc0
removed TOKEN_LEN (useless)
2011-05-03 12:51:16 -03:00
Roberto Ierusalimschy
c9ce754e38
comment
2011-05-02 14:33:01 -03:00
Roberto Ierusalimschy
d34271fe42
MacOS 'strtod' handles hexa formats too
2011-04-29 10:56:28 -03:00
Roberto Ierusalimschy
d120ec29ca
bug in OP_SELF when method name goes to a register
2011-04-28 11:00:11 -03:00
Roberto Ierusalimschy
2aff901c93
Mac OS defines LUA_USE_AFORMAT and LUA_USE_LONGLONG by default
2011-04-20 15:25:54 -03:00
Roberto Ierusalimschy
bad231c481
'LUA_USELONGLONG' -> 'LUA_USE_LONGLONG'
2011-04-20 13:36:28 -03:00
Roberto Ierusalimschy
a2b1c279f1
'LUA_USELONGLONG' on by default on Linux + LUA_USE_HEXAFLOAT renamed
...
to LUA_USE_STRTODHEX (as Lua 5.2 always *uses* hexa floats)
2011-04-19 15:31:30 -03:00
Roberto Ierusalimschy
2f128c5130
'luaL_setfuncs' does not need to accept a NULL list. (If there is
...
no list, there is no reason to call this function.)
2011-04-19 15:29:41 -03:00
Roberto Ierusalimschy
4758113043
change in opcode OP_LOADNIL: B is used as a counter instead of a
...
register. (Avoids an assignment to R(B), not present in any other
instruction.)
2011-04-19 13:22:13 -03:00
Roberto Ierusalimschy
a4e644add2
small bug (masked by wrong entry for OP_TEST in opcodes.c)
2011-04-18 16:49:13 -03:00
Roberto Ierusalimschy
05ca63642b
added macro for code checking
2011-04-18 16:48:53 -03:00
Roberto Ierusalimschy
f17e3624ef
local function name only visible to debug info after being initialized
2011-04-18 16:48:24 -03:00
Roberto Ierusalimschy
2e9b8476ca
detail ('luai_apicheck' should be used always through macro 'api_check')
2011-04-18 12:02:37 -03:00
Roberto Ierusalimschy
c31f4946e9
copyright updated to 2011
2011-04-18 11:15:48 -03:00
Roberto Ierusalimschy
c86586e866
small corrections in description of OP_TEST and OP_LOADKX
2011-04-12 14:27:35 -03:00
Roberto Ierusalimschy
19fbdf6cae
'luaL_findtable' -> 'luaL_getsubtable'
2011-04-08 16:17:36 -03:00
Roberto Ierusalimschy
427ee519db
new instruction OP_LOADKX (to replace OP_LOADK with extra argument)
2011-04-07 15:14:12 -03:00
Roberto Ierusalimschy
a958b711f5
cleaner scheme of bits for variant types (light C functions) and
...
collectable types
2011-04-07 13:11:57 -03:00
Roberto Ierusalimschy
1ffdd0bc7a
detail (should use macro 'ttisdeadkey')
2011-04-05 15:32:28 -03:00
Roberto Ierusalimschy
5286650894
new macro 'ttisequal'
2011-04-05 15:32:06 -03:00
Roberto Ierusalimschy
0fb1644c60
2nd operand for unary tag methods does not need to be 'nil'
2011-04-05 11:26:23 -03:00
Roberto Ierusalimschy
119d5e46d5
lua_arith gets no fake operand for unary minus
2011-04-05 11:26:23 -03:00
Roberto Ierusalimschy
83abbac946
all names used internally by macros end with '_'
2011-04-05 11:24:07 -03:00
Roberto Ierusalimschy
a25416a8d5
use of 'luaL_tolstring' for option '%s' in 'string.format'
2011-03-18 16:02:33 -03:00
Roberto Ierusalimschy
682cce3813
macro 'mark' renamed 'EOFMARK' ('mark' is too easy to confict, e.g.
...
in alllua.c)
2011-03-14 12:39:42 -03:00
Roberto Ierusalimschy
d806710ab5
returns for file-related functions and process-related functions
...
unified in 'auxlib'
2011-03-03 13:34:46 -03:00
Roberto Ierusalimschy
e049abb69a
loaders receive an extra argument returned by the searcher
...
(typically the file name)
2011-03-01 14:01:53 -03:00
Roberto Ierusalimschy
98816d0ce5
small problems with 'luaone.c'
2011-02-28 14:32:10 -03:00
Roberto Ierusalimschy
7482e8f914
no need of lookahead in Zio
2011-02-23 10:13:10 -03:00
Roberto Ierusalimschy
03b769053a
correct interpretation of return value from pclose
2011-02-21 16:12:54 -03:00
Roberto Ierusalimschy
3c710f056b
small bug: may call reader function again after it returned end
...
of input
2011-02-17 15:34:16 -02:00
Roberto Ierusalimschy
c0a865fa54
error for repeated label + jumps allowed to labels followed by
...
'no-op' statements
2011-02-14 14:36:34 -02:00
Roberto Ierusalimschy
0009ac1f3a
'break' does not need to be last statement in a block +
...
'explist1' -> 'explist' + moving a few functions around
2011-02-14 12:59:28 -02:00
Roberto Ierusalimschy
7b968bb514
p-close returns "correct" status plus type of termination
2011-02-10 13:35:50 -02:00
Roberto Ierusalimschy
bf8b08295a
'break' coded as 'goto' + small bug when closing multiple gotos
...
to the same label
2011-02-10 12:50:41 -02:00
Roberto Ierusalimschy
3f5b56c48b
simpler code for repeat-until
2011-02-09 15:03:18 -02:00
Roberto Ierusalimschy
e7192dfdbb
corrected 'follow' for checking whether label is last statement
...
in a block
2011-02-09 14:51:28 -02:00
Roberto Ierusalimschy
0539f48661
small changes in goto-related error messages
2011-02-09 12:45:19 -02:00
Roberto Ierusalimschy
e7a9c45a48
trying to avoid assumption that sizeof(char)==1
2011-02-07 17:15:24 -02:00
Roberto Ierusalimschy
fd6c1f4898
ensures that all local variables are declared inside some block,
...
opening a new block at 'open_func'
2011-02-07 17:00:30 -02:00
Roberto Ierusalimschy
f079749287
some reorganization of dynamic data structures used by the parser
2011-02-07 15:14:50 -02:00
Roberto Ierusalimschy
f8d677f94c
no more 'OP_CLOSE' instructions (use jumps to close upvalues)
2011-02-07 10:28:27 -02:00
Roberto Ierusalimschy
094a7d0290
detail in 'print_usage'
2011-02-07 10:27:13 -02:00
Roberto Ierusalimschy
7cc0e63d8a
first implementation of 'goto'
2011-02-04 15:34:43 -02:00
Roberto Ierusalimschy
a4a8914c20
new reserved word 'goto'
2011-02-02 12:55:17 -02:00
Roberto Ierusalimschy
06c7efb4a9
avoid extra increment to 'savedpc' when jumping
2011-02-01 16:32:55 -02:00
Roberto Ierusalimschy
dd547c55c8
new scheme to close upvalues in 'break'; jump instructions may
...
do the close, avoiding the need for a OP_CLOSE instruction
2011-02-01 16:03:10 -02:00
Roberto Ierusalimschy
f6bd8b1147
better control for GC running or stopped
2011-02-01 14:52:38 -02:00
Roberto Ierusalimschy
a7faa557fa
bug: problem with optimizations of short-circuit logic
2011-01-31 12:52:32 -02:00
Roberto Ierusalimschy
026a7e92be
bug in some short-circuit optimizations
2011-01-31 12:28:41 -02:00
Roberto Ierusalimschy
c4ea0c3b29
detail (cleaning trailing spaces)
2011-01-26 14:30:02 -02:00
Roberto Ierusalimschy
7106c491dd
'sep' argument to 'string.rep' + 'string.rep' preallocates entire
...
buffer before creating resulting string
2011-01-12 18:36:01 -02:00
Roberto Ierusalimschy
a10d495b18
'luaL_findtable' returns boolean about whether it created a new
...
table (to easy initializing table)
2011-01-10 13:51:42 -02:00
Roberto Ierusalimschy
c2e3cc4c89
using 'luaL_findtable' to manage hook table
2011-01-10 13:51:19 -02:00
Roberto Ierusalimschy
67feed49f1
optional argument 'sep' to 'searchpath'
2011-01-07 16:54:49 -02:00
Roberto Ierusalimschy
b63b0928cf
prototype for 'luaO_ceillog2' was different from definition
2011-01-07 13:46:27 -02:00
Roberto Ierusalimschy
511679313f
new function 'rawlen'
2011-01-07 10:41:48 -02:00
Roberto Ierusalimschy
868ff40339
full collection does not restart collector + avoid changing GC
...
state if an error happens in a step
2010-12-29 16:00:23 -02:00
Roberto Ierusalimschy
aa6faa6331
own implementation of 'tunumber', so that it works correctly with
...
numbers outside the 'int' range
2010-12-27 16:00:38 -02:00
Roberto Ierusalimschy
0b3f4e254e
more efficient hash for numbers in IEEE754 machines
2010-12-23 13:38:28 -02:00
Roberto Ierusalimschy
551b076f1c
change in the relationship between totalbytes and GCdebt - luaM_realloc_
...
is too critical to update two counters
2010-12-20 17:40:07 -02:00
Roberto Ierusalimschy
737f119187
better control for GC running or stopped
2010-12-20 16:17:46 -02:00
Roberto Ierusalimschy
8980c630bf
error when indexing strings with invalid keys
2010-12-20 15:25:36 -02:00
Roberto Ierusalimschy
8d579c5bc5
'debug.setmetatable' returns object (like 'setmetatable')
2010-12-20 15:24:15 -02:00
Roberto Ierusalimschy
d51743b0c7
removed 'newproxy'
2010-12-17 13:14:58 -02:00
Roberto Ierusalimschy
1a92c2b354
allows number of bits used by the library to be changed from outside
2010-12-17 11:26:38 -02:00
Roberto Ierusalimschy
fe0d54d37e
table library respects '#' metamethods
2010-12-17 10:15:34 -02:00
Roberto Ierusalimschy
c9af0768fc
GC does not mark dead registers inside activation record
2010-12-17 10:05:37 -02:00
Roberto Ierusalimschy
7e0caa7d61
new closures are always created on "next" register (so that GC knows
...
stack limit)
2010-12-17 10:03:41 -02:00
Roberto Ierusalimschy
a40768e5ea
new macro 'luaC_condGC' to allow extra code to be run in case
...
of GC steps
2010-12-17 10:02:29 -02:00
Roberto Ierusalimschy
4a83fe569c
comment
2010-12-15 17:13:29 -02:00
Roberto Ierusalimschy
b83b6ba015
'loadin' -> 'load'
2010-12-13 14:38:00 -02:00
Roberto Ierusalimschy
af119c8b55
official support for floating hexa numerals
2010-12-10 17:03:46 -02:00
Roberto Ierusalimschy
1aead7f553
'hexafloat' moved to 'lobject.c' (hexa conversion needs it too)
2010-12-10 12:53:15 -02:00
Roberto Ierusalimschy
75d8470f0f
new macro 'cast_uchar'
2010-12-10 11:40:22 -02:00
Roberto Ierusalimschy
81646af13b
'loadstring' deprecated; use 'load' instead
2010-12-08 10:58:04 -02:00
Roberto Ierusalimschy
233b71c092
comment
2010-12-07 09:40:42 -02:00
Roberto Ierusalimschy
ccc4fc9cf0
detection of erroneous numeric strings with \0 (such as "1\0")
2010-12-06 19:08:36 -02:00
Roberto Ierusalimschy
c79b4a97aa
using 'strspn' to skip spaces in 'tonumber'
2010-12-06 14:25:48 -02:00
Roberto Ierusalimschy
ac3afc7cd4
'printf' replaced by 'luai_writestring'
2010-12-03 15:20:50 -02:00
Roberto Ierusalimschy
350cc4bcb6
'micro' bug: when closing state, old objects are finalized (breaking
...
assertion)
2010-12-03 09:48:25 -02:00
Roberto Ierusalimschy
35931bbed4
comments
2010-12-02 17:51:15 -02:00
Roberto Ierusalimschy
12779b2b71
getlocal/setlocal can access vararg parameters
2010-11-30 15:17:51 -02:00
Roberto Ierusalimschy
7ca1bd639f
new functions 'extract' and 'replace'
2010-11-29 13:19:28 -02:00
Roberto Ierusalimschy
9b7a12c46d
finalizers (__gc) for tables
2010-11-26 12:32:31 -02:00
Roberto Ierusalimschy
5b33e39855
removed deprecated functions getn-foreach-foreachi
2010-11-23 15:21:14 -02:00
Roberto Ierusalimschy
a64cf8fac9
'test' -> 'btest'
2010-11-22 16:06:33 -02:00
Roberto Ierusalimschy
092fa71ddd
conventional names for bitwise operators
2010-11-22 14:39:20 -02:00
Roberto Ierusalimschy
a2eaad5d81
'gfind' was deprecated in 5.1
2010-11-19 14:25:51 -02:00
Roberto Ierusalimschy
54771c5afa
keep 'seminfo->ts' even for reserved words, just in case
...
(some lhf's tools need this)
2010-11-18 16:38:44 -02:00
Roberto Ierusalimschy
bcce769d29
avoid "unreacheable code" warnings
2010-11-18 16:38:27 -02:00
Roberto Ierusalimschy
24baa919c1
small bug: 'find' did not detect magic chars after a \0 in a pattern
...
and did a plain search in those cases
2010-11-16 18:39:41 -02:00
Roberto Ierusalimschy
d1c0efdb7d
comment about compatibility-only functions
2010-11-16 17:20:01 -02:00
Roberto Ierusalimschy
566758de79
'getuservalue' accepts any type of argument
2010-11-16 16:01:28 -02:00
Roberto Ierusalimschy
50334faad6
no more compatibility with (veryyyy) old ref system
2010-11-16 15:43:29 -02:00
Roberto Ierusalimschy
cee7a8e1ec
-DLUA_COMPAT_ALL is the default
2010-11-16 09:39:42 -02:00
Roberto Ierusalimschy
8c21f463ed
'debug' library is loaded by default
2010-11-12 13:48:30 -02:00
Roberto Ierusalimschy
a1952d9c41
'l_tvar' renamed to 'l_tg'
2010-11-12 13:47:34 -02:00
Roberto Ierusalimschy
1a46a713d2
new macro 'l_tvar' to easy the use of mathlib with other floating
...
types (float and long double)
2010-11-11 13:39:12 -02:00
Roberto Ierusalimschy
23b9ceb0a4
allows larger array parts in tables (no need to restrict it to 2^26)
2010-11-11 13:38:43 -02:00
Roberto Ierusalimschy
0a6a6b9d9d
no more sentinel to detect loops in module dependencies;
...
usual message for infinite recursion is good enough.
2010-11-10 18:00:04 -02:00
Roberto Ierusalimschy
1b54197491
better error message when light userdata is used instead of a
...
full userdata
2010-11-10 16:06:10 -02:00
Roberto Ierusalimschy
c97aa9485c
new function 'luaL_setmetatable'
2010-11-10 16:05:36 -02:00
Roberto Ierusalimschy
e885b91326
'luaL_typeerror' deprecated
2010-11-10 15:38:10 -02:00
Roberto Ierusalimschy
fa1f724378
when reading blocks with given size, try to read whole block
...
at once
2010-11-09 14:57:49 -02:00
Roberto Ierusalimschy
2a966116b1
detail (message)
2010-11-09 09:04:15 -02:00
Roberto Ierusalimschy
43ec354722
added support for conditional use of %Lg when using long double
2010-11-08 15:38:37 -02:00
Roberto Ierusalimschy
700b003fb5
when reading large files, double buffer size at each iteration
2010-11-08 15:27:22 -02:00
Roberto Ierusalimschy
f722ba6890
code should not use "defined" types, but "typedef"s types when they
...
are available (i.e., after including lua.h) + small changes to make
conversions more portable across diferent types for lua_Number
(long double) and lua_Unsigned (long long unsigned)
2010-11-08 14:33:20 -02:00
Roberto Ierusalimschy
c7d4da8746
correction to allow lua_Unsigned larger than usigned int
2010-11-08 14:31:22 -02:00
Roberto Ierusalimschy
f1629217f1
code for conversion macros moved from luaconf to llimits + 'uint'
...
renamed to 'unsigned' in those macros
2010-11-03 13:16:17 -02:00
Roberto Ierusalimschy
fdd5f2f7a3
comment typos
2010-10-29 15:52:46 -02:00
Roberto Ierusalimschy
c6ef3e2672
bug: by-one error when creating short source names (luaO_chunkid)
2010-10-29 13:54:55 -02:00
Roberto Ierusalimschy
ba8dca00ac
detail (ununsed parameter)
2010-10-29 12:35:09 -02:00
Roberto Ierusalimschy
9be89a1864
'luaL_checkversion' also checks convertions (number to integer types)
2010-10-29 10:52:21 -02:00
Roberto Ierusalimschy
b9f371a3c2
added another option for ieeeendian
2010-10-29 09:13:21 -02:00
Roberto Ierusalimschy
4834de8427
comment typo
2010-10-29 09:13:14 -02:00
Roberto Ierusalimschy
94043a3a1a
more robust implementation for 'luaO_str2d'
2010-10-28 13:39:03 -02:00
Roberto Ierusalimschy
e642cc4206
correct handling of negative numbers in non-10 bases by 'tonumber'
...
(e.g., tonumber(-34, 8))
2010-10-28 13:36:30 -02:00
Roberto Ierusalimschy
da57477c3d
added more platforms for ieeeendianess + small comments
2010-10-28 13:18:25 -02:00
Roberto Ierusalimschy
f39034889d
stricter control over number of bits in each operation
2010-10-28 13:17:29 -02:00
Roberto Ierusalimschy
6b053a63cb
added check for architectures with known endianess (only i386 now)
2010-10-27 15:16:37 -02:00
Roberto Ierusalimschy
572e5e6b28
new names for bit functions (mimicking assembler)
2010-10-27 14:50:32 -02:00
Roberto Ierusalimschy
6098e06e09
better organization for coercion functions between lua_Number and
...
integer types + IEEE trick to be used in most platforms, by default
2010-10-26 17:32:19 -02:00
Roberto Ierusalimschy
c6b64ffe65
new type lua_Unsigned and corresponding projection/injection functions
2010-10-25 18:31:11 -02:00
Roberto Ierusalimschy
4590a89b32
corrected warnings from different compilers (mostly casts and small
...
details)
2010-10-25 17:01:37 -02:00
Roberto Ierusalimschy
1475cb59bf
version from lhf
2010-10-25 12:33:38 -02:00
Roberto Ierusalimschy
9e8e60dd5f
bitlib renamed to 'bit32' + new function for arithmetic shift
2010-10-25 12:32:36 -02:00
Roberto Ierusalimschy
d72ec210c7
POS_A replaced by POS_Ax (which is more "precise")
2010-10-25 10:24:55 -02:00
Roberto Ierusalimschy
c77baf752c
comment
2010-10-25 10:24:36 -02:00
Roberto Ierusalimschy
a122688091
better error message for 'lua -e -i'
2010-10-18 14:06:33 -02:00
Roberto Ierusalimschy
f3026c36c2
details in opcode list
2010-10-13 13:45:54 -03:00
Roberto Ierusalimschy
cd0ebd0a80
'proto->source' may be NULL (if dump strips debug information)
2010-10-11 17:24:42 -03:00
Roberto Ierusalimschy
8bc33a088c
'os.exit' acceps booleans as status (for EXIT_SUCESS and EXIT_FAILURE)
2010-10-05 09:18:03 -03:00
Roberto Ierusalimschy
c3eb89544f
'luaL_loadlib' accepts Utf8 BOM in the beginning of files
2010-10-01 15:53:00 -03:00
Roberto Ierusalimschy
ffff9a49da
'nresults' in CallInfo now refers to number of results that the current
...
function returns (and not what it expects from a call)
2010-09-30 14:21:31 -03:00
Roberto Ierusalimschy
b22356e5c5
hexadecimal constants may be floating values too
2010-09-13 18:49:58 -03:00
Roberto Ierusalimschy
a289a62717
'loadin' should not check whether upvalue is called '_ENV',
...
because its name may be unknown when there is no debug information.
2010-09-07 16:38:36 -03:00
Roberto Ierusalimschy
e3eabcf913
'lua_[gs]etupvalue' may work even without debug information
...
(that is, without upvalue names)
2010-09-07 16:35:04 -03:00
Roberto Ierusalimschy
0df2238063
name "_ENV" configurable through 'luaconf.h'
2010-09-07 16:21:39 -03:00
Roberto Ierusalimschy
6828f6d427
new parameter 'majorinc' to control frequency of major collections
...
in generational mode
2010-09-03 11:14:01 -03:00
Roberto Ierusalimschy
daa5fe3e31
'loadin' should accept any value for the environment (not only tables) +
...
it should check whether chunk has upvalue named '_ENV'
2010-08-23 15:03:11 -03:00
Roberto Ierusalimschy
8d9ea59d28
'pushclosure' -> 'codeclosure' (as there is another 'pushclosure' in
...
'lvm.c) + small detail
2010-08-23 14:32:34 -03:00
Roberto Ierusalimschy
5e7dbd0b8b
api checks to ensure that thread is OK when using lua_call/lua_pcall
2010-08-04 15:40:28 -03:00
Roberto Ierusalimschy
cd6c276e41
use index 0 for header of list of free references
2010-08-03 17:21:16 -03:00
Roberto Ierusalimschy
fd4b4a2a68
detail: registry._PRELOAD must be a table, no need to check
2010-08-02 14:14:48 -03:00
Roberto Ierusalimschy
d447945685
'module'/'luaL_register' and associates are deprecated
2010-07-28 12:51:59 -03:00
Roberto Ierusalimschy
78f9635111
several new comments
2010-07-26 12:53:23 -03:00
Roberto Ierusalimschy
8b7cf8c62d
'lua_[gs]etenv' -> 'lua_[gs]etuservalue'
2010-07-25 12:18:19 -03:00
Roberto Ierusalimschy
73b0a3451d
environment variables consulted by Lua may be version-specific
2010-07-25 12:03:37 -03:00
Roberto Ierusalimschy
85c1461422
new macros LUA_VERSION_{MAJOR/MINOR/RELEASE}
2010-07-25 12:02:41 -03:00
Roberto Ierusalimschy
5ba556d27a
using curly brackets to mark blocks of '#if/#else/#endif's
2010-07-18 11:34:45 -03:00
Roberto Ierusalimschy
81dd13f4c6
new way to distinguish between indexing tables in registers and
...
tables in upvalues (+ fixed small bug when checking conflicts in
multiple assignments)
2010-07-07 13:27:29 -03:00
Roberto Ierusalimschy
6a02bbe1e2
better organization for fields in struct 'expdesc'
2010-07-02 17:42:40 -03:00
Roberto Ierusalimschy
7631c29b2f
comand-line option '-l' creates global with given name after
...
requiring module
2010-07-02 14:36:32 -03:00
Roberto Ierusalimschy
a9dc7c8828
functions lua_tonumber/lua_tointeger replaced by lua_tonumberx/lua_tointegerx
...
that have an extra out parameter with conversion status
2010-07-02 14:35:06 -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
a139e2e003
old (and complex) luaL_findtable now used only in compatibility code
...
inside lauxlib.c
2010-06-30 14:40:27 -03:00
Roberto Ierusalimschy
a71c5f6f53
typo in comments
2010-06-30 11:11:17 -03:00
Roberto Ierusalimschy
d9ea6eca7c
macro 'key2tal' replaced by 'gkey' (as both were equal)
2010-06-25 09:18:10 -03:00
Roberto Ierusalimschy
ca3865cf1b
'getlocal' gets information about parameters of Lua functions
2010-06-21 13:30:12 -03:00
Roberto Ierusalimschy
bef5980744
no more support for old Mac OS systems
2010-06-18 14:23:02 -03:00
Roberto Ierusalimschy
409741e900
'what' may be NULL in 'kname'
2010-06-16 10:44:36 -03:00
Roberto Ierusalimschy
b98de30b8f
'ipair' is back
2010-06-13 16:41:34 -03:00
Roberto Ierusalimschy
9f48712c15
use ANSI versions of DLL functions in Windows
2010-06-13 16:36:17 -03:00
Roberto Ierusalimschy
bd262d591f
'coroutine' library separated from 'baselib'
2010-06-10 18:30:26 -03:00
Roberto Ierusalimschy
0d116c3ada
unused '#include' removed
2010-06-10 18:27:09 -03:00
Roberto Ierusalimschy
79f11fb2bb
back with #-comments for binary files
2010-06-09 14:53:59 -03:00
Roberto Ierusalimschy
fabe4ec487
better barrier for prototypes
2010-06-07 13:55:34 -03:00
Roberto Ierusalimschy
575074fd85
Lua closures are cached for reuse
2010-06-04 10:25:10 -03:00
Roberto Ierusalimschy
545f43065f
'luaF_newLclosure' gets prototype of new closure as argument
2010-06-04 10:06:15 -03:00
Roberto Ierusalimschy
3819c30e55
better names for barrier macros
2010-06-04 10:05:29 -03:00
Roberto Ierusalimschy
e94fac8956
bug: generational collection was not running collector! (must write
...
a test for this...)
2010-06-02 15:36:58 -03:00
Roberto Ierusalimschy
2c1a5d678d
factoring out common code in 'module' and 'luaL_openlib'
2010-05-31 13:34:19 -03:00
Roberto Ierusalimschy
bd619b9311
new macro MAXUPVAL (maximum number of upvalues per closure)
2010-05-31 13:08:55 -03:00
Roberto Ierusalimschy
aca84ee1a0
correct definition for 'lua_cpcall' (tested)
2010-05-28 11:27:07 -03:00
Roberto Ierusalimschy
5038e3c58c
corrected compatibility macro 'lua_cpcall' (untested)
2010-05-27 09:06:42 -03:00
Roberto Ierusalimschy
5a7dee0c5d
added class '%g' in patterns (for graphical characters)
2010-05-24 16:34:57 -03:00
Roberto Ierusalimschy
ddf1f2a053
GC should not run when stopped, even in hard tests
2010-05-24 16:29:46 -03:00
Roberto Ierusalimschy
e34d3c06b0
it is better to call open functions with lua_call to not mess
...
the caller stack
2010-05-20 09:57:59 -03:00
Roberto Ierusalimschy
e8a2c36909
more comments
2010-05-18 14:32:19 -03:00
Roberto Ierusalimschy
3c39a0e8cb
bug: loadfile of binary files read first character twice
2010-05-18 14:21:24 -03:00
Roberto Ierusalimschy
3d45a8eb1c
really stop collection during finalizers
2010-05-17 17:39:31 -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
3811e23b32
detail (comment)
2010-05-17 15:30:27 -03:00
Roberto Ierusalimschy
12c764ed1e
semicolons now represent the empty statement
2010-05-15 10:32:02 -03:00
Roberto Ierusalimschy
e99e9a9473
patches for last two bugs (string.format and io.read)
2010-05-14 12:34:57 -03:00
Roberto Ierusalimschy
f35ac38e1d
updated depenency lists + eliminated duplication of definitions
...
for MYCFLAGS, MYLDFLAGS, and MYLIBS.
2010-05-14 12:08:10 -03:00
Roberto Ierusalimschy
058279d548
comments
2010-05-14 12:03:43 -03:00
Roberto Ierusalimschy
69ba1ac441
new "instruction" 'absindex'
2010-05-14 10:15:54 -03:00
Roberto Ierusalimschy
4a925c1552
in 'absindex', do not need to call gettop (can inline it)
2010-05-14 10:15:26 -03:00
Roberto Ierusalimschy
cf531912f2
one more macro (mvdispatch) to easy experiments with alternative
...
dispatch methods
2010-05-13 16:53:05 -03:00
Roberto Ierusalimschy
0d00729e31
detail (breaking a long line)
2010-05-13 09:03:26 -03:00
Roberto Ierusalimschy
b6e9fcbd70
use of macro ('vmcase') to format all cases in main switch of
...
'luaV_execute' (to facilitate experiences with direct threading)
2010-05-12 17:40:35 -03:00
Roberto Ierusalimschy
8554baeacf
small changes in 'luaV_execute' to make cases more regularly formatted
2010-05-12 17:31:33 -03:00
Roberto Ierusalimschy
f5b7f077ec
added comments to '#else' and '#endif' in long conditionals
2010-05-12 11:17:36 -03:00
Roberto Ierusalimschy
e924a7f9ea
new API function 'lua_absindex'
2010-05-12 11:09:20 -03:00
Roberto Ierusalimschy
4fd76b8148
avoid "strong" cast
2010-05-11 17:49:26 -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
1c1a98e872
corrected some places where an old object could end up in front
...
of a new one + minimal documentation about this problem
2010-05-10 15:23:45 -03:00
Roberto Ierusalimschy
c006f085d9
new macro 'resetoldbit'
2010-05-10 13:46:49 -03:00
Roberto Ierusalimschy
a48e330f37
macros 'lua_number2int' and 'lua_number2uint' for Visual Studio
...
corrected and tested
2010-05-10 13:38:58 -03:00
Roberto Ierusalimschy
dcc070683c
avoid reserving LUA_RIDX_LAST slots in any table used by reference
...
system. Store free list in a field indexed by a unique name,
instead of using a numerical index.
2010-05-10 12:25:02 -03:00
Roberto Ierusalimschy
2d81cfa4e1
corrected definition of 'lua_register' (there is no LUA_ENVIRONINDEX
...
anymore)
2010-05-10 10:50:20 -03:00
Roberto Ierusalimschy
0bccf03d7e
slightly better definition for 'changenvalue'
2010-05-07 15:44:46 -03:00
Roberto Ierusalimschy
ad2b5decc8
'lua_assert' can be empty when assertions are off
2010-05-07 15:44:12 -03:00
Roberto Ierusalimschy
32c1764b5d
slightly better definition for 'isgray'
2010-05-07 15:43:51 -03:00
Roberto Ierusalimschy
de97177744
avoid 'else assert' (which may result in an empty else)
2010-05-07 15:43:24 -03:00
Roberto Ierusalimschy
fa2ddb070a
details (to avoid too long strings in assertions)
2010-05-07 15:23:17 -03:00
Roberto Ierusalimschy
0fac33da9e
bug: incremental sweep was not cleaning old bits (as it stopped in the
...
first old object) + bug: moving udata to 'udgc' list might put old
object in front a new one + some new macros + generational mode may
be in 'pause' state (it just skips 'markroot')
2010-05-07 15:19:36 -03:00
Roberto Ierusalimschy
8e1bdda66a
stupid bug when calling 'luaC_changemode' (in function lua_gc)
2010-05-07 15:10:01 -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
b373a40133
new macro 'isgenerational' + new macro 'isold' + better deffinition
...
for 'isdead', compatible with the code used by 'sweeplist'
2010-05-07 15:08:05 -03:00
Roberto Ierusalimschy
25951e0ea5
some cleaning in 'sweeplist' (threads do not need to be traversed
...
if they are going to be collected + use of bit masks to unify
differences in generational and incremental modes)
2010-05-06 15:18:07 -03:00
Roberto Ierusalimschy
a4f20e3c8b
comments
2010-05-06 15:17:22 -03:00
Roberto Ierusalimschy
8c583c61a3
more tests in 'lua_checkmemory'
2010-05-06 15:16:57 -03:00
Roberto Ierusalimschy
d2ea5b00b7
new function 'luaC_changemode' +
...
bug: objects entering the 'allgc' list must have their OLDBIT cleared
(upvalues being cleared) + bug: in 'checkSizes', KGC_EMERGENCY is
stored in 'gckind' field, not in 'gcstate' + current white changes when
entering sweep phase (so there are dead objects only in that phase)
2010-05-05 15:58:36 -03:00
Roberto Ierusalimschy
d77898597e
new function 'luaC_changemode'
2010-05-05 15:53:41 -03:00
Roberto Ierusalimschy
237f755dca
typos in comments
2010-05-05 15:49:56 -03:00
Roberto Ierusalimschy
7444b5a1d5
better documentation of GC costs
2010-05-05 10:39:58 -03:00
Roberto Ierusalimschy
e7ce7e1850
changes in patch to monitor garbage collection
2010-05-04 15:10:02 -03:00
Roberto Ierusalimschy
3e662cec89
full GC must run finalizers only after finishing everything else
...
(including a return to generational mode if needed)
2010-05-04 15:09:06 -03:00
Roberto Ierusalimschy
fde866e303
details (comments)
2010-05-04 14:25:19 -03:00
Roberto Ierusalimschy
2d7a81a204
missing parentheses in declaration
2010-05-04 14:21:08 -03:00
Roberto Ierusalimschy
658ea8752b
no need to handle '\0' differently from other control chars in
...
format '%q'
2010-05-04 14:20:33 -03:00
Roberto Ierusalimschy
aa73403ba4
no need of a KGC_FORCED collection kind; it has the same behavior of
...
a normal collection
2010-05-03 14:39:48 -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
85555646e3
invariant must be kept in atomic 'phase' too
2010-05-03 08:24:30 -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
b9e1dec2cb
added comment explaining a bit about the invariants of the collector
2010-04-30 15:36:45 -03:00
Roberto Ierusalimschy
dc2b8a0073
detail
2010-04-30 15:36:22 -03:00
Roberto Ierusalimschy
9a9fe42deb
wrong comment
2010-04-30 15:17:24 -03:00
Roberto Ierusalimschy
0062db1e06
default PAUSE should be 200 (differences may be corrected in
...
internal multiplers)
+ check for unbilt stack equal the one used by lgc.c
2010-04-30 11:22:23 -03:00
Roberto Ierusalimschy
23001d8607
nasty GC bug: upvalue must be turned white when not keeping invariant,
...
but barrier was not being called when uv->v were already white.
2010-04-29 18:43:36 -03:00
Roberto Ierusalimschy
5d79c6684b
removed commented-out debugging code
2010-04-29 18:42:33 -03:00
Roberto Ierusalimschy
3410dcd375
new way to control GC speed
2010-04-29 14:35:10 -03:00
Roberto Ierusalimschy
5a7a0c72d8
'luaC_linkupval' embedded into call site
2010-04-29 14:34:35 -03:00
Roberto Ierusalimschy
ee7478e884
improved 'lua_checkmemory', with better control over gray objects
2010-04-29 14:33:51 -03:00
Roberto Ierusalimschy
aaa5d7adab
'luaC_linkupval' moved into 'lfunc.c' code + new way to control GC speed
2010-04-29 14:32:40 -03:00
Roberto Ierusalimschy
3eb1788bb4
new way to control GC speed (keeping a 'debt' counter)
2010-04-29 14:31:31 -03:00
Roberto Ierusalimschy
00114a95b2
lots of new comments + small changes in loop controls + other small
...
"janitor work"
2010-04-26 14:58:00 -03:00
Roberto Ierusalimschy
4aaf0ef75c
"to-be-finalized" objects marked and sweeped like all other objects
2010-04-20 17:15:30 -03:00
Roberto Ierusalimschy
ed720d09f3
upvalue barriers for Lua functions must act on the upvalue itself,
...
not on its closure
2010-04-20 17:14:50 -03:00
Roberto Ierusalimschy
376e939ef6
missing parentheses around 'luaL_pushresultsize' declaration
2010-04-19 15:52:15 -03:00
Roberto Ierusalimschy
9d28e2b3e5
bug with io.read(op, "*n")
2010-04-19 15:04:58 -03:00
Roberto Ierusalimschy
49ca1f7083
allows thread switches (when/if there are thread switches) in the same
...
places that finalizers can run (so they should be safe...)
2010-04-19 14:58:46 -03:00
Roberto Ierusalimschy
4db6f20770
ensure that 'luai_userstatethread' is always called (even if
...
'stack_init' throws a memory error)
2010-04-19 14:40:13 -03:00
Roberto Ierusalimschy
cca71912e6
'gcinfo' was deprecated in version 5.0.
2010-04-19 14:02:02 -03:00
Roberto Ierusalimschy
8003e9544d
'string.format' may get buffer as an argument when there are
...
missing arguments and format string is too long
2010-04-19 13:39:25 -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
26d4a73962
with light C functions, 'pairs' does not need to keep 'next' as an
...
upvalue.
2010-04-19 13:36:06 -03:00
Roberto Ierusalimschy
99a39f6f4a
tells the allocation function that the first block is a thread
2010-04-19 13:34:46 -03:00
Roberto Ierusalimschy
1bb407e494
in lua_gc/step, 'luaC_step' changes GCthreshold, so there was little
...
control over the real step size.
2010-04-19 13:33:19 -03:00
Roberto Ierusalimschy
53f9499f7f
"light C function" is a better name than "C-function pointer"
2010-04-18 10:22:48 -03:00
Roberto Ierusalimschy
575befc394
comparsion tag methods follow the same rule as other binary TMs
2010-04-18 10:15:11 -03:00
Roberto Ierusalimschy
e7ffb1b501
macro LUA_USE_LONGJMP allows choosing longjmp when compiling Lua as
...
C++ code
2010-04-18 09:41:35 -03:00
Roberto Ierusalimschy
c066ac10a9
better line numbers for function calls and unary/binary operators +
...
null statement + no more "ambiguous syntax" restriction
2010-04-17 09:46:32 -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
d8d81ba891
new escape sequence '\*' + several comments + moving options from
...
switch default into cases (as now locale is fixed)
2010-04-16 09:31:07 -03:00
Roberto Ierusalimschy
cf22133b69
no need to avoid calling ctype functions as now they are implemented
...
by us (no inefficiencies due to accessing locale information)
2010-04-15 16:44:43 -03:00
Roberto Ierusalimschy
b7be05ad27
invalid instructions "cannot" happen
2010-04-15 16:43:43 -03:00
Roberto Ierusalimschy
afdb19ac82
no more 'ccall' nor 'cpcall' functions. (With light C functions they
...
are obsolete.)
2010-04-14 12:14:21 -03:00
Roberto Ierusalimschy
7dfa4cd655
first implementation of light C functions
2010-04-14 12:13:48 -03:00
Roberto Ierusalimschy
fc6203ee43
BUG: 'string.format' may get buffer when there are missing arguments
2010-04-12 13:13:02 -03:00
Roberto Ierusalimschy
b2dd246b7a
better control in 'totalmem' over choosing counters
2010-04-12 13:07:39 -03:00
Roberto Ierusalimschy
d20ff60615
new macro LUA_NUMTAGS
2010-04-12 13:07:29 -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
4541243355
patterns now accept '\0' as a regular character
2010-04-12 09:00:50 -03:00
Roberto Ierusalimschy
9100f7479a
new implementation for Generic Buffer manipulation (using userdata as
...
temporary buffer space)
2010-04-09 13:14:46 -03:00
Roberto Ierusalimschy
055104f5b6
keep memory-error message in the global state, so that its use
...
does not depend on Lua internalizing strings to avoid a string
creation on memory errors
2010-04-08 14:16:46 -03:00
Roberto Ierusalimschy
28aa733c15
macro 'eqstr' was being used to compare non-string entities
2010-04-08 14:06:33 -03:00
Roberto Ierusalimschy
6abde1b05a
no need to keep "_ENV" name in global state (can be kept in lex state)
2010-04-05 13:35:37 -03:00
Roberto Ierusalimschy
d394d5536a
new macro 'eqstr'
2010-04-05 13:26:37 -03:00
Roberto Ierusalimschy
a2f98314a3
'lua_pushstring' now uses 'luaS_new'
2010-04-05 11:21:38 -03:00
Roberto Ierusalimschy
a09c8d7beb
cannot sweep main thread in sweepstring phase
2010-04-05 11:15:35 -03:00
Roberto Ierusalimschy
f80ff7a336
'luaS_new' changed from macro to function
2010-04-03 17:24:18 -03:00
Roberto Ierusalimschy
a08fc34ee4
avoid using 'luaS_new' when can use 'luaS_newlstr'
2010-04-02 12:39:07 -03:00
Roberto Ierusalimschy
d00d2eaf51
small changes in 'luaO_pushvfstring'
2010-04-02 12:30:27 -03:00
Roberto Ierusalimschy
11126422d9
option to return GC to normal (incremental, non generational) mode
2010-04-02 12:19:19 -03:00
Roberto Ierusalimschy
e54668b696
added proper code to trace garbage collection
2010-04-02 11:37:41 -03:00
Roberto Ierusalimschy
9eb832de54
work related to hooks moved from 'luaV_execute' to 'traceexec'
2010-03-29 17:45:49 -03:00
Roberto Ierusalimschy
82a1f5d354
comments
2010-03-29 14:44:31 -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
5c87f61e6b
major collections in generational mode
2010-03-25 16:37:23 -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
64d39ed1b6
generational mode no longer sweep old objects
2010-03-24 12:51:10 -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
5cb128ea54
BUG: emergency collector might resize 'strt' (string table) when
...
creating a new string
+ atomic and markroot steps has some cost
+ full collection must leave collector in proper state when mode
is generational
2010-03-23 17:16:06 -03:00
Roberto Ierusalimschy
74123e9686
draft version of a generational mode for garbage collection. (Not well
...
tested; no major collections; ...)
2010-03-22 15:28:03 -03:00
Roberto Ierusalimschy
9c196bebad
detail (wrong comment about LUAI_GCPAUSE)
2010-03-22 14:45:55 -03:00
Roberto Ierusalimschy
28b2566c97
'lua_assert' not visible from libraries
2010-03-22 14:28:31 -03:00
Roberto Ierusalimschy
caf74dd731
'cpcall' renamed to 'ccall' as it does not do a protected call
2010-03-19 18:04:17 -03:00
Roberto Ierusalimschy
62840c5fad
'ipairs' is deprecated
2010-03-19 12:52:48 -03:00
Roberto Ierusalimschy
5ca7cdd709
for compatibility only: 'module' changes the first upvalue of
...
calling function to affect its environment
2010-03-19 12:02:34 -03:00
Roberto Ierusalimschy
1514e49d43
avoid using function environments in C libraries (as it probably will
...
be deprecated)
2010-03-17 18:37:37 -03:00
Roberto Ierusalimschy
22ef84b6c8
'_ENV' name permanently stored in global state for easier access
2010-03-13 12:55:42 -03:00
Roberto Ierusalimschy
63a2b62468
must include 'string.h' because a macro uses 'strlen'
2010-03-13 12:55:01 -03:00
Roberto Ierusalimschy
489253d753
better definitions for lua_[gs]etglobal + less uses of ENVIRONINDEX
2010-03-13 00:57:46 -03:00
Roberto Ierusalimschy
25c557ec63
first version of _ENV; no more global variables
2010-03-12 16:14:06 -03:00
Roberto Ierusalimschy
f292760f12
small optimization in luaL_addlstring (avoid adding chars one by one)
...
(suggested by Chuck Coffing)
2010-03-12 15:59:32 -03:00
Roberto Ierusalimschy
1124cb1247
first step towards _ENV: all chunks have an puvalues _ENV with the
...
global table
2010-03-08 13:55:52 -03:00
Roberto Ierusalimschy
c295147874
when finding a 'name' for a function, handle the case when the function
...
is a for iterator
2010-03-05 11:01:29 -03:00
Roberto Ierusalimschy
e560ac4862
when searching for a variable name, look existing upvalues before
...
goingg to upper levels
2010-03-04 15:12:57 -03:00
Roberto Ierusalimschy
915a9a912c
just in case, better to flush error messages
2010-03-03 15:53:02 -03:00
Roberto Ierusalimschy
ae0a5e2142
new option '*L' for io.read + options for io.lines
2010-03-03 15:48:57 -03:00
Roberto Ierusalimschy
347f0c33d1
avoid 'continue' unless necessary
2010-02-27 18:16:24 -03:00
Roberto Ierusalimschy
622e448710
removed useless test (argv[i] cannot be NULL when i<argc)
2010-02-27 18:15:36 -03:00
Roberto Ierusalimschy
0fe2576a39
new instructions to optimize indexing on upvalues
2010-02-26 17:40:29 -03:00
Roberto Ierusalimschy
d08d237a49
detail: in loadfile read function, no need to return NULL on EOF;
...
size ==0 is enough to signal EOF.
2010-02-18 17:37:57 -02:00
Roberto Ierusalimschy
64a7ec987c
avoid using 'ungetc' in loadfile
2010-02-18 17:32:41 -02:00
Roberto Ierusalimschy
4274738e81
new macro 'luai_writestringerror'
2010-02-18 17:18:41 -02:00
Roberto Ierusalimschy
0d7d559dcc
no need to flush either stderr or \n-terminated outputs
2010-02-11 15:12:27 -02:00
Roberto Ierusalimschy
af512ad6da
use of 'conventional' names for shift and rotate operations +
...
right/left versions for them
2010-02-11 13:55:29 -02:00
Roberto Ierusalimschy
d27108ccd5
removed support for '#fist-line comment' on binary files (as binary
...
files do not have lines...)
2010-02-11 13:52:50 -02:00
Roberto Ierusalimschy
a838b3b496
better usage messages, showing entire offending argument
2010-02-09 09:58:57 -02:00
Roberto Ierusalimschy
4c54cd3a10
when yielding, original 'func' value must be kept and restored so
...
that 'poscall' puts results in the right slot.
2010-02-09 09:56:29 -02:00
Roberto Ierusalimschy
c8ff7de7f0
field 'oldtop' renamed to 'extra', as it can be used for other
...
purposes
2010-02-09 09:55:37 -02:00
Roberto Ierusalimschy
3bae8e047c
typo (thanks to Gavin)
2010-02-05 17:09:09 -02:00
Roberto Ierusalimschy
4f5f2fe367
new function 'luaL_cpcall'
2010-01-21 14:49:21 -02:00
Roberto Ierusalimschy
01586d539e
typo in comment
2010-01-21 14:31:24 -02:00
Roberto Ierusalimschy
c8ab34ab7a
better messages for invalid options
2010-01-21 14:31:06 -02:00
Roberto Ierusalimschy
36ab1ee10c
__unm metamethod gets nil as its 2nd parameter
2010-01-15 14:23:58 -02:00
Roberto Ierusalimschy
193ce46970
table.pack was locking last result, avoiding its collection
2010-01-13 17:59:10 -02:00
Roberto Ierusalimschy
b678f246a4
HINSTANCE -> HMODULE (they are the same thing, but the MS documentation
...
uses the latter) + LoadLibrary -> LoadLibraryEx with optional arguments,
to allow the option LOAD_WITH_ALTERED_SEARCH_PATH
2010-01-13 14:30:27 -02:00
Roberto Ierusalimschy
f270e7f044
warnings that are not compatible with C++ separated from other warning
...
options
2010-01-13 14:19:54 -02: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
0c7de97d47
correct error message when yielding from outside a coroutine
2010-01-13 14:17:32 -02:00
Roberto Ierusalimschy
900b7d4514
on 64-bit machines, an address may not fit into a 'long', so it
...
is better to convert from pointer to void to pointer to function
directly, even if ANSI C does not like it.
2010-01-13 14:09:05 -02:00
Roberto Ierusalimschy
91f0b20a0e
missing standard defines
2010-01-12 17:40:02 -02:00
Roberto Ierusalimschy
e4b4623abc
'searchpath' changes dots into directory separators
2010-01-11 15:55:25 -02:00
Roberto Ierusalimschy
cef96b73e1
added casts from int to enumerations to follow C++ rules
2010-01-11 15:38:30 -02:00
Roberto Ierusalimschy
427e01eb63
removed useless initialization
2010-01-11 15:37:59 -02:00
Roberto Ierusalimschy
d320c908d0
conversion from pointer to void to pointer to function seems more
...
"correct" if done through an integral type (because conversions
between pointers and numbers are allowed, only "implementation
defined").
2010-01-11 15:34:59 -02:00
Roberto Ierusalimschy
8bfc696676
missing 'external' in variable declaration
2010-01-11 15:33:09 -02:00
Roberto Ierusalimschy
97a35e70af
pathes corrected to 5.2
2010-01-11 15:15:30 -02:00
Roberto Ierusalimschy
03b556b963
corrected copyright notice to 2010
2010-01-11 15:15:11 -02:00
Roberto Ierusalimschy
572b94bbcb
include of 'windows.h' moved to where it is needed
2010-01-11 15:11:24 -02:00
Roberto Ierusalimschy
692209fa8d
Dynamic C functions should be created with the global table as their
...
initial environments
2010-01-11 15:06:31 -02:00
Roberto Ierusalimschy
953d499ea2
changed macro lua_number2int for Windows (added brackets; some recent
...
compilers complain about the old format) + added missing definition
for 'lua_number2int' in Windows case.
2010-01-11 14:35:20 -02:00
Roberto Ierusalimschy
a541ada194
"-"-trick in C packages now accept name-v13...
2010-01-11 14:10:47 -02:00
Roberto Ierusalimschy
55d3138397
removed old prototype for 'luaI_openlib' (which does not exist anymore)
2010-01-11 14:00:45 -02:00
Roberto Ierusalimschy
e74e56f2b1
better may to force recompilation when makefile changes
2010-01-08 18:05:36 -02:00
Roberto Ierusalimschy
1ebf109c53
'setobj' must assing fields one by one, to allow trick of using
...
pad space in table keys
2010-01-08 18:00:20 -02:00
Roberto Ierusalimschy
f75be1cb28
removed parentheses around some function names in their definitions
2010-01-08 13:16:56 -02:00
Roberto Ierusalimschy
16d2ad88fe
some changes in compatibility macros: added LUA_COMPAT_ALL + compatibility
...
macros from lua.h and lauxlib.h moved to luaconf.h
2010-01-06 13:15:04 -02:00
Roberto Ierusalimschy
f3a6815000
compatibility code removed or moved to luaconf.h
2010-01-06 13:14:15 -02:00
Roberto Ierusalimschy
19f8c87375
compatibility code moved to luaconf.h
2010-01-06 13:08:00 -02:00
Roberto Ierusalimschy
5bcfe0c700
new debug info 'isvararg' and 'nparams'
2010-01-06 12:42:35 -02:00
Roberto Ierusalimschy
8cd395564c
no need to use two different defines (LUA_DL_DLOPEN and LUA_USE_DLOPEN)
2010-01-06 12:35:17 -02:00
Roberto Ierusalimschy
389c890ed3
again changing macro to function to save a few bytes
2010-01-06 09:48:02 -02:00
Roberto Ierusalimschy
e3866afa97
macro 'luaY_checklimit' changed into a function (and renamed 'checklimit').
...
It makes no sense to trade space for time in the parser.
2010-01-05 16:46:58 -02:00
Roberto Ierusalimschy
25189b420d
field 'nups' in struct 'lua_Debug' changed from 'int' to 'unsigned
...
char' to save some space (even C functions cannot have more than
maxchar upvalues).
2010-01-05 16:33:26 -02:00
Roberto Ierusalimschy
cec25167d1
new api_check that 'pcallk' cannot be called inside hooks
2010-01-04 16:17:51 -02:00
Roberto Ierusalimschy
1fd4c482a0
reorganization of switch in function 'match' (details)
2010-01-04 14:37:19 -02:00
Roberto Ierusalimschy
35e729fa6d
comments + small details
2010-01-04 14:36:39 -02:00
Roberto Ierusalimschy
0dc09cb42e
'unpack' moved to table library (and therefore "renamed" to
...
'table.unpack'.
2009-12-28 14:30:31 -02:00
Roberto Ierusalimschy
cc1cbd19a0
'lua_cpcall' is deprecated + other small changes in 'pmain' (comments
...
and reordering to check arguments before running any Lua code)
2009-12-22 14:47:12 -02:00
Roberto Ierusalimschy
cb3f95d516
'lua_cpcall' is deprecated
2009-12-22 14:47:00 -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
3cb343efd6
code for error message for 'setn' removed
2009-12-18 14:53:12 -02:00
Roberto Ierusalimschy
ec0fc1a13b
missing parentheses around 'lua_version' + moving typdef's before
...
the extra include
2009-12-18 13:32:36 -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
b3b8dfaaea
yet more options moved from luaconf.h into internal files
2009-12-17 11:08:51 -02:00
Roberto Ierusalimschy
adc6a4865b
macro name change: LUA_INIT->LUA_INIT_VAR
2009-12-17 11:07:41 -02:00
Roberto Ierusalimschy
2108754e46
macro name change: LUA_PATH->LUA_PATH_VAR, LUA_CPATH->LUA_CPATH_VAR,
...
LUA_PATHSEP->LUA_PATH_SEP, LUA_EXECDIR->LUA_EXEC_DIR
2009-12-17 11:06:47 -02:00
Roberto Ierusalimschy
46f1429936
more options moved from luaconf.h into internal files
2009-12-17 10:50:20 -02:00
Roberto Ierusalimschy
e0f9d1c8f5
removed export of function only for coco
2009-12-17 10:28:57 -02:00
Roberto Ierusalimschy
de6fc75d63
several configuration options that do not change often moved out of
...
luaconf.h and into more internal files
2009-12-17 10:26:09 -02:00
Roberto Ierusalimschy
2af0d3b459
allocator function receives the tag of object being allocated in 'osize'
...
when 'ptr' is NULL.
2009-12-16 14:42:58 -02:00
Roberto Ierusalimschy
9fbe0690fb
base-level C use global table as its environment
2009-12-15 09:25:36 -02:00
Roberto Ierusalimschy
a25b8ff69c
detail ('lua_tolstring' instead of lua_objlen)
2009-12-15 09:25:16 -02:00
Roberto Ierusalimschy
15b823ce4f
cleaner way to add extra space in a lua state.
2009-12-14 13:27:30 -02:00
Roberto Ierusalimschy
8da245bfd2
better to keep GC state numbers sequential, to optimize switch in
...
'singlestep'
2009-12-11 19:31:14 -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
2e51792596
avoid using deprecated macros lua_[gs]etglobal
2009-12-11 11:40:44 -02:00
Roberto Ierusalimschy
3a9ae612a4
macro 'ngcotouv' is the same as 'gco2uv', so it was removed
2009-12-11 11:39:34 -02:00
Roberto Ierusalimschy
9db693a57c
detail (comment)
2009-12-10 17:00:33 -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
2bb19ccf08
reordering of some functions + cleaner way to code lua_resume/resume +
...
small bug in lua_resume (in case of calling errors lua_resume should
remove only new arguments from the stack and push error message).
2009-12-10 16:20:07 -02:00
Roberto Ierusalimschy
64d5df7772
detail (lua_resume should empty coroutine stack even if they do not
...
fit into caller stack)
2009-12-10 16:17:37 -02:00
Roberto Ierusalimschy
2643da67c6
error messages from 'lua_resume' must be generated in protected mode,
...
to avoid raising memory errors
2009-12-08 16:59:24 -02:00
Roberto Ierusalimschy
ed117bb42a
lua_checkstack does not raise memory errors (instead it signals them)
2009-12-08 14:15:43 -02:00
Roberto Ierusalimschy
a4472490bc
new 'table.pack' function
2009-12-07 13:50:27 -02:00
Roberto Ierusalimschy
86312e1a7d
lua_objlen calls __len metamethod on tables (if present)
2009-12-07 13:49:47 -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
513d0258d9
details
2009-12-01 14:31:04 -02:00
Roberto Ierusalimschy
cfa8bc3ca4
continuations may be upvalues too
2009-11-27 13:39:31 -02:00
Roberto Ierusalimschy
a654e82f5c
coroutines may have C bodies
2009-11-27 13:38:51 -02:00
Roberto Ierusalimschy
3e41afcec5
extra api checks for number of returns of C functions and for lua_yield
2009-11-27 13:37:59 -02:00
Roberto Ierusalimschy
3acf5ec5a1
update of file dependencies (gcc -MM)
2009-11-27 12:39:31 -02:00
Roberto Ierusalimschy
93695db903
'table.maxn' deprecated
2009-11-26 15:35:13 -02:00
Roberto Ierusalimschy
9107dd115c
no more compatibility code for 'string.gfind'
2009-11-26 14:49:28 -02:00
Roberto Ierusalimschy
dc4c459546
a few new warnings
2009-11-26 14:36:55 -02:00
Roberto Ierusalimschy
19a6c38745
detail in 'currentpc' (only needs to work for Lua functions)
2009-11-26 13:34:15 -02:00
Roberto Ierusalimschy
3c4d970a7b
comment typos
2009-11-26 09:39:20 -02:00
Roberto Ierusalimschy
b0f2b288a6
new scheme for debug info about tail calls: no more 'fake' stack entries,
...
but stack entry knows whether it was tail called
2009-11-25 13:27:51 -02:00
Roberto Ierusalimschy
2b25489b47
'notail' -> 'noextrachars' ('notail' may confuse with tail calls)
2009-11-24 16:05:12 -02:00
Roberto Ierusalimschy
a6f465f558
new mark LUAMOD_API for all luaopen_* functions
2009-11-24 10:05:44 -02:00
Roberto Ierusalimschy
9a41506b8f
'os.exit' should close state only when second argument is true
2009-11-23 16:20:38 -02:00
Roberto Ierusalimschy
9a6d9ea57a
GC may get stuck during a parser and avoids proper resizing of the
...
string table, making its lists grow too much and degrading performance.
2009-11-23 12:59:30 -02:00
Roberto Ierusalimschy
062e809e54
new macros 'LUAI_DDEC'/'LUAI_DDEF' to better control declarations and
...
definitions of non-static variables
2009-11-19 17:06:52 -02:00
Roberto Ierusalimschy
b4c1824824
'luaV_arith' must be marked 'LUAI_FUNC' (as all non-static functions)
2009-11-19 17:04:58 -02:00
Roberto Ierusalimschy
2e5ef6a9fb
new macro 'isdummy'
2009-11-19 15:54:07 -02:00
Roberto Ierusalimschy
1dea393058
small corrections for 'luaall.c'
2009-11-19 14:26:52 -02:00
Roberto Ierusalimschy
45dec34597
comments
2009-11-19 14:26:29 -02:00
Roberto Ierusalimschy
b40a38a8ac
remove declaration of removed function
2009-11-19 14:24:41 -02:00
Roberto Ierusalimschy
ac899a6307
'debug.joinupvalue' -> 'debug.upvaluejoin'
2009-11-18 13:50:18 -02:00
Roberto Ierusalimschy
ce444bff33
(huge) simplification of GC management
2009-11-18 11:13:47 -02:00
Roberto Ierusalimschy
2d5931ebc8
ensure that reader function cannot yield during parsing
2009-11-17 14:46:44 -02:00
Roberto Ierusalimschy
35fa276099
parser/scanner keep GC running
2009-11-17 14:33:38 -02:00
Roberto Ierusalimschy
b51d76ce8d
when doing hard memory tests, perform a full GC at every possible step
2009-11-17 09:56:03 -02:00
Roberto Ierusalimschy
95020afb63
'module' returns the new module (to be used with lexical environments)
2009-11-16 13:51:19 -02:00
Roberto Ierusalimschy
c5050b1c41
functions 'getfenv' and 'setfenv' are deprecated
2009-11-16 13:51:03 -02:00
Roberto Ierusalimschy
b9063a08f5
new function 'loadin'
2009-11-13 15:01:40 -02:00
Roberto Ierusalimschy
7fe405739c
renaming: 'lua_upvaladdr' -> 'lua_upvalueid',
...
'lua_upvaljoin' -> 'lua_upvaluejoin'
2009-11-09 17:10:48 -02:00
Roberto Ierusalimschy
1ce819333d
new option 'isrunning' for 'lua_gc' (and 'collectgarbage')
2009-11-09 16:55:17 -02:00
Roberto Ierusalimschy
88eb901f81
registry and global table may be changed through the API without a
...
write barrier, so GC should visit them in the atomic phase.
2009-11-09 16:29:21 -02:00
Roberto Ierusalimschy
2583bac3d3
several small changes to simplify changing TValue if needed
2009-11-06 15:09:27 -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
fbf866a1a5
macro 'gkey' returns a "real" TValue*
2009-11-06 15:07:48 -02:00
Roberto Ierusalimschy
49a67c6d3f
new macro 'NILCONSTANT' to initialize nil constants
2009-11-06 15:07:12 -02:00
Roberto Ierusalimschy
a921d81033
avoid using 'ttype' when there is an explicit test + macro 'checkdeadkey'
...
to avoid repetitions
2009-11-06 15:06:19 -02:00
Roberto Ierusalimschy
155dd01163
avoid using 'ttype' when there is an explicit test
2009-11-06 15:05:34 -02:00
Roberto Ierusalimschy
599789a907
better to enclose macros in 'if' bodies with brackets
2009-11-06 15:03:37 -02:00
Roberto Ierusalimschy
9756f56354
better control over accesses to TValue fields
2009-11-05 15:43:54 -02:00
Roberto Ierusalimschy
b7d5f18d71
api functions to manipulate upvalues do not need to check their
...
arguments (the caller must check them before calling)
2009-11-05 15:26:00 -02:00
Roberto Ierusalimschy
5598b2bc55
new functions to identify and join upvalues
2009-11-05 14:48:31 -02:00
Roberto Ierusalimschy
77077b39d5
comment explaining OP_VARARG was wrong (and corresponding code was not
...
very clear)
2009-10-28 10:20:07 -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
f5073de0a7
'ipairs' goes until length of array instead of stopping at the first nil
2009-10-23 10:50:25 -02:00
Roberto Ierusalimschy
f6ed285cf2
new hash for doubles based on frexp, to avoid low-level tricks
2009-10-23 10:31:12 -02:00
Roberto Ierusalimschy
1448e736f0
better documentation for constructor syntax
2009-10-14 13:43:11 -03:00
Roberto Ierusalimschy
6e415e9387
local function definition does not need to correct debug information
2009-10-13 16:35:42 -03:00
Roberto Ierusalimschy
b114c99a60
two small bugs: 'debug.getinfo' did not consider negative indices as out
...
of range + 'debug.[gs]etlocal' crash on tail calls
2009-10-13 16:07:40 -03: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
ba21aa8b2b
'cpcall' must ensure correct environment for called function
2009-09-30 17:49:47 -03:00
Roberto Ierusalimschy
d119cf3035
a few more instructions to testC (func2udata and getfield)
2009-09-30 17:49:25 -03:00
Roberto Ierusalimschy
0ac3d07ea6
first implementation of lexical environments
2009-09-30 12:38:37 -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
1829911d7c
some operations may shrink g->totalbytes so g->estimate must be
...
more flexible
2009-09-28 10:50:34 -03:00
Roberto Ierusalimschy
bed2cb725a
initialize g->estimate (just in case)
2009-09-28 10:50:19 -03:00
Roberto Ierusalimschy
ab75bd23ee
handle extended opcodes (with OP_EXTRAARG) when checking metamethod
...
calls
2009-09-28 09:37:17 -03:00
Roberto Ierusalimschy
cee94df6e0
function list in luaL_register may be NULL for an empty list
2009-09-28 09:36:40 -03:00
Roberto Ierusalimschy
fcc46467fa
limit of constants per function changed to 2^26 using extra arguments
...
to opcodes LOADK, GETGLOBAL, and SETGLOBAL
2009-09-23 17:33:05 -03:00
Roberto Ierusalimschy
f8e354e240
detail (space between function name and its parameter list)
2009-09-23 17:14:00 -03:00
Roberto Ierusalimschy
a650378822
'cpcall' reimplemented as a predefined value in the registry
2009-09-21 09:09:52 -03:00
Roberto Ierusalimschy
99182c6872
references must start after predefined values in the registry
2009-09-18 15:58:45 -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
a68494fb32
'debug.[gs]etupvalue' should be able to access C upvalues too
2009-09-09 17:32:19 -03:00
Roberto Ierusalimschy
4b44793dc5
"bug": lua_createtable with sizes changed (array <-> record)
2009-09-07 11:24:12 -03:00
Roberto Ierusalimschy
90e2a716c8
details + comments
2009-09-05 09:39:29 -03:00
Roberto Ierusalimschy
d9fbbe1f23
"file:write" returns "file" in case of success
2009-09-01 16:10:48 -03:00
Roberto Ierusalimschy
4a714cebd1
API checks now have explanatory messages
2009-08-31 11:26:28 -03:00
Roberto Ierusalimschy
5b6be84106
ensures that argument 'mode' to 'io.open' matches "[rwa]%+?b?", to
...
avoid passing invalid modes to 'fopen'.
2009-08-28 10:51:57 -03:00
Roberto Ierusalimschy
b2bb2f7f59
better machinery to test continuations in the C API
2009-08-26 14:41:26 -03:00
Roberto Ierusalimschy
f096ab5421
correct way to check arguments to 'strftime'
2009-08-25 16:58:08 -03:00
Roberto Ierusalimschy
4e1ffc482a
test for 'fs' being NULL at the end of 'close_func' is useless ('fs'
...
cannot be NULl and the new ls->fs can only be NULL when the token
is EOS, in which case anchor_token has no effect).
2009-08-10 17:41:04 -03:00
Roberto Ierusalimschy
bc439e21cd
avoid an unprotected call to 'lua_tostring' which theoretically may
...
cause a panicked exit
2009-08-10 13:23:19 -03:00
Roberto Ierusalimschy
1b4480003b
"stange numbers" (-0 and NaN) also go to the constant table (as
...
strings with their binary representation). Therefore, constant
folding may produce these results.
2009-08-10 12:31:44 -03:00
Roberto Ierusalimschy
42167804b8
luaH_[gs]etnum renamed to luaH_[gs]etint (as they only accept integers,
...
not generic numbers).
2009-08-07 14:53:28 -03:00
Roberto Ierusalimschy
3135a6bbab
luaH_[gs]etnum renamed to luaH_[gs]etint (as they only accept integers,
...
not generic numbers)
2009-08-07 13:17:41 -03:00
Roberto Ierusalimschy
95cbc402dc
"But" -> "Bug" (misspelling)
2009-08-05 10:09:38 -03:00
Roberto Ierusalimschy
decada8dc2
'debug.getfenv' does not check whether it has an argument
2009-08-04 15:51:19 -03:00
Roberto Ierusalimschy
ee5d03b42a
small bug: debug.getfenv should check whether it has an argument
2009-08-04 15:27:57 -03:00
Roberto Ierusalimschy
323f33d014
'collectgarbage"count"' returns a second argument with the count%1024.
2009-08-04 15:20:18 -03:00
Roberto Ierusalimschy
55dc7fb240
bug: stack must be cleared until its end (including extra size) +
...
control of stack size moved to 'ldo.c'
2009-07-16 13:26:09 -03:00
Roberto Ierusalimschy
11d7ba79f2
tail calls do not need to move whole new frame down, only its slice
...
up to last parameter (the rest has not been used yet)
2009-07-15 15:38:16 -03:00
Roberto Ierusalimschy
bd5fa9cc8f
new macro 'getproto'
2009-07-15 15:37:19 -03:00
Roberto Ierusalimschy
2658c94925
detail (comment: 'correspoding' -> 'corresponding')
2009-07-15 14:57:30 -03:00
Roberto Ierusalimschy
215885768c
'index2adr' -> 'index2addr' (correct spelling)
2009-07-15 14:57:03 -03:00
Roberto Ierusalimschy
a5f68589c0
avoid using 'UNUSED' (not defined outside the kernel)
2009-07-15 14:49:48 -03:00
Roberto Ierusalimschy
28419c4383
'luaL_tolstring' uses 'lua_tolstring' instead of 'lua_tostring' and
...
'lua_objlen'
2009-07-15 14:47:34 -03:00
Roberto Ierusalimschy
5bff2aaf47
calls with LUA_MULTRET may leave no free slots in the stack
2009-07-15 14:35:20 -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
abb85fc059
new definition for 'luaD_checkstack' to avoid possible overflows
2009-07-08 13:06:51 -03:00
Roberto Ierusalimschy
aabe3ddbf4
errors in 'resume' should be all protected
2009-07-08 13:06:07 -03:00
Roberto Ierusalimschy
0c258c8492
smart use of varargs may create functions that return too
...
many arguments and overflow the stack of C functions.
2009-07-02 16:57:34 -03:00
Roberto Ierusalimschy
d57c9cdefc
BUG: 'luaV_settable' may invalidate a reference to a table and try
...
to reuse it.
2009-07-01 18:10:33 -03:00
Roberto Ierusalimschy
afb3f7e754
bug: 'luaV_settable' may invalidate a reference to a table and try
...
to reuse it.
2009-07-01 17:31:25 -03:00
Roberto Ierusalimschy
88564c3aec
Standard library for bitwise operations
2009-07-01 13:17:08 -03:00
Roberto Ierusalimschy
3abe3da9fb
new module 'lbitlib.c' for bitwise operations
2009-07-01 13:16:40 -03:00
Roberto Ierusalimschy
eb8499c8e0
use of LUAI_UINT32 replaced by 'unsigned LUA_INT32' (one less
...
definition needed)
2009-07-01 13:14:15 -03:00
Roberto Ierusalimschy
47c562435b
better error messages for luaL_checkversion
2009-06-19 11:21:57 -03:00
Roberto Ierusalimschy
02504d86d3
l_version may be local to 'lua_version'
2009-06-19 11:21:23 -03:00
Roberto Ierusalimschy
4a818f068a
'checkversion' implemented in the auxiliary library
2009-06-18 15:59:58 -03:00
Roberto Ierusalimschy
1d6ebce296
new function 'lua_version' (so that 'checkversion' can be implemented
...
in the auxiliary library)
2009-06-18 15:59:18 -03:00
Roberto Ierusalimschy
bc3e02a1b7
default paths have dot option as the last one (to improve security)
2009-06-18 15:19:36 -03:00
Roberto Ierusalimschy
f4eed60ca9
better treatment of integer formats in string.format
2009-06-18 13:51:03 -03:00
Roberto Ierusalimschy
c1de1fdac6
small optimization in 'lua_arith' (avoids overhead in the common case
...
of both arguments being numbers)
2009-06-18 13:36:40 -03:00
Roberto Ierusalimschy
a36c8e1718
new macro 'changenvalue'
2009-06-18 13:36:40 -03:00
Roberto Ierusalimschy
d7872dcf91
small optimization (reorder of BinOpr enum to unify some cases
...
in switches)
2009-06-18 13:35:05 -03:00
Roberto Ierusalimschy
14115170bc
lua_objlen should not work for numbers (according to the manual)
2009-06-17 15:38:54 -03:00
Roberto Ierusalimschy
ec52149485
'lua_lessthan' replaced by more generic 'lua_compare'
2009-06-17 14:53:50 -03:00
Roberto Ierusalimschy
6980cb1aa7
new functions 'lua_arith' and 'lua_compare'
2009-06-17 14:53:14 -03:00
Roberto Ierusalimschy
59a59fafc6
exports luaV_arith to be used by lua_arith
2009-06-17 14:51:07 -03:00
Roberto Ierusalimschy
2bdd194f43
exports luaV_arith to be used by lua_arith + uses 'luaO_arith' to
...
perform basic arith. operations
2009-06-17 14:50:09 -03:00
Roberto Ierusalimschy
96fa34ec32
constant folding uses 'luaO_arith' to perform basic operations
2009-06-17 14:49:09 -03:00
Roberto Ierusalimschy
6a024df440
new function 'luaO_arith' to perform basic arithmetic operations
2009-06-17 14:48:34 -03:00
Roberto Ierusalimschy
77fd93188e
'lessequal' renamed 'luaV_lessequal' and exported to be used by
...
'lua_compare'
2009-06-17 13:17:14 -03:00
Roberto Ierusalimschy
a21c89ddc8
new API function 'lua_mainthread'
2009-06-15 16:51:31 -03:00
Roberto Ierusalimschy
49b88b1c39
patch for wrong code generation for some particular boolean expressions
2009-06-15 11:12:59 -03:00
Roberto Ierusalimschy
3db5f60547
BUG: "(((1 or false) and true) or false)" gives wrong result
2009-06-15 10:52:08 -03:00
Roberto Ierusalimschy
2258ec6bc9
'getline' renamed to 'getfuncline' (to avoid problems with POSIX)
2009-06-10 13:57:53 -03:00
Roberto Ierusalimschy
2598138ece
new function 'luaK_codek' (detail)
2009-06-10 13:52:03 -03:00
Roberto Ierusalimschy
4a67e48611
new macro 'condmovestack' instead of 'condhardstacktests'
2009-06-08 16:35:59 -03:00
Roberto Ierusalimschy
5cdec7d124
added "\n" at the end of 'package.config' (so that the string
...
is a sequence of complete lines)
2009-06-04 16:34:24 -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
57f8414de1
small bug in 'luaV_concat' (L->top was left incorrect in some cases)
2009-05-27 14:11:27 -03:00
Roberto Ierusalimschy
139d562861
type of 'luai_ctype_' array changed to unsigned (safer for bitwise
...
operations)
2009-05-27 13:51:15 -03:00
Roberto Ierusalimschy
eea6d10866
details (use ci->base instead of L->base when possible)
2009-05-22 12:19:54 -03:00
Roberto Ierusalimschy
019ebcb85f
errors in finalizers are propagated with code LUA_ERRGCMM (ERRor in
...
__gc MetaMethod)
2009-05-21 17:06:11 -03:00
Roberto Ierusalimschy
889284ebd0
hexadecimal escape sequences in strings + better error messages for
...
bad decimal escape sequences
2009-05-18 14:28:04 -03:00
Roberto Ierusalimschy
6956331093
new macro 'zungetc'
2009-05-18 14:26:25 -03:00
Roberto Ierusalimschy
92479f1a8b
new property 'lisupper' (needed to compute values for hexa digits)
2009-05-18 14:15:14 -03:00
Roberto Ierusalimschy
e67dc3a227
'symbexec' merged with 'getobjname' (as only use for symbolic execution
...
now is to find a "good" name for an object)
2009-05-04 15:26:21 -03:00
Roberto Ierusalimschy
0cc3add9f8
variable renaming: 'lualibs' -> 'loadedlibs'; 'luareqlibs' ->
...
'preloadedlibs'
2009-05-01 10:46:35 -03:00
Roberto Ierusalimschy
71c2eeff98
comments
2009-05-01 10:37:11 -03:00
Roberto Ierusalimschy
d7bc346d7a
no more code checking
2009-04-30 14:42:21 -03:00
Roberto Ierusalimschy
673c456cba
resize string hash table only when new size is smaller than current one
2009-04-29 14:09:41 -03:00
Roberto Ierusalimschy
ea44570883
hash table for strings is rehashed in place
2009-04-29 14:09:41 -03:00
Roberto Ierusalimschy
e091a254df
new way to GC stacks: the entire stack must be correct all the times;
...
the 'dead' part of a stack (after the top) must have only nil's, so
that 'top' may go up without cleaning the stack.
2009-04-28 16:04:36 -03:00
Roberto Ierusalimschy
58c3aa8b5f
malicious zero-length string in binary code may segfault Lua +
...
wrong code generation for some particular boolean expressions
2009-04-27 17:11:11 -03:00
Roberto Ierusalimschy
c1f78ff3d3
unused arguments removed
2009-04-27 15:58:31 -03:00
Roberto Ierusalimschy
e5249b9fb5
'exit' changed to 'abort' in case of panic (+ some extra comments)
...
'abort' seems more in line with panic ("abnormal termination")
2009-04-26 18:55:35 -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
c6b442bd36
'luaM_freearray' does not need array type as argument
2009-04-17 11:40:13 -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
311e9f3ceb
'nresults' is saved in CallInfo from the caller, not the called
2009-04-15 13:53:39 -03:00
Roberto Ierusalimschy
8775f25830
new function 'T.makeCfunc' (for later use)
2009-04-14 16:10:17 -03:00
Roberto Ierusalimschy
70a63fa5ad
first implementation of yieldable 'pcall'
2009-04-08 15:04:33 -03:00
Roberto Ierusalimschy
fffbaede75
detail
2009-04-03 12:58:03 -03:00
Roberto Ierusalimschy
ae9ad6c694
added comment explaining why the 'feof' test when loading a file
2009-04-02 16:54:06 -03:00
Roberto Ierusalimschy
83d2dbb15d
Lua will abort anyway, so 'panic' does not need to.
2009-03-31 14:25:08 -03:00
Roberto Ierusalimschy
4e43741943
in 'lua_call', avoid preparing a continuation when thread cannot yield.
2009-03-30 15:39:20 -03:00
Roberto Ierusalimschy
a274596ecc
avoid making 'lastfree' an invalid pointer
2009-03-30 15:38:24 -03:00
Roberto Ierusalimschy
7e9bc41fe7
'loadlib(lib, "*")' loads 'lib' with global names exported to all
2009-03-26 19:25:05 -03:00
Roberto Ierusalimschy
b1e1c15ced
small bug: EOZ is a valid character to be tested
2009-03-26 15:53:52 -03:00
Roberto Ierusalimschy
3dbf305408
no more support for old-style varargs
2009-03-26 09:57:01 -03:00
Roberto Ierusalimschy
6d0ae11c57
'context' added to suspendable calls
2009-03-23 11:26:12 -03:00
Roberto Ierusalimschy
3ca739b418
'math.random' uses lua_Number to manage its arguments (there is no
...
reason to lose range).
2009-03-17 14:55:39 -03:00
Roberto Ierusalimschy
9e613b8583
missing argument to 'assert' raises "assertion failed" error
2009-03-16 13:30:50 -03:00
Roberto Ierusalimschy
9428ec42d0
new optional argument to 'load', to control allowed modes (binary or
...
textual chunks)
2009-03-13 12:50:03 -03:00
Roberto Ierusalimschy
6ffcf21367
ctype 'lalpha' includes '_' (as '_' behaves as a letter from the
...
point of view of Lua)
2009-03-11 10:27:32 -03:00
Roberto Ierusalimschy
6427c61e7c
added macro 'lisxdigit' (just in case :)
2009-03-10 14:42:33 -03:00
Roberto Ierusalimschy
ba484b9eb1
yielding across lua_call (first version)
2009-03-10 14:14:37 -03:00
Roberto Ierusalimschy
f9d015523e
better notes about some opcodes (comments only)
2009-03-09 12:27:56 -03:00
Roberto Ierusalimschy
1817dfc301
initial separation, in CallInfo, of what is relevant only to Lua
...
functions or only to C functions
2009-03-04 10:32:29 -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
910310d3ba
if thread has no error handling, try main thread handler before panicking
2009-03-03 15:51:24 -03:00
Roberto Ierusalimschy
facfcd497f
detail
2009-03-02 13:34:23 -03:00
Roberto Ierusalimschy
b403317325
error functions search global space for a name for a function when
...
no other name is available
2009-02-27 15:18:19 -03:00
Roberto Ierusalimschy
9bf05e7364
code section 'Traceback' moved to the beginning of the file
2009-02-27 15:17:13 -03:00
Roberto Ierusalimschy
e39e758a73
closing a "popen" file returns the process exit status
2009-02-20 10:50:27 -03:00
Roberto Ierusalimschy
5438d77221
global array of ctypes renamed to 'luai_ctype_' (extern names must
...
use a "lua" prefix...)
2009-02-20 10:11:15 -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
ada82930fd
"homemade" version of ctype.h
2009-02-19 14:18:25 -03:00
Roberto Ierusalimschy
f36e319658
'fputs' changed to 'luai_writestring' + use of 'lua_checkversion'
2009-02-19 14:15:35 -03:00
Roberto Ierusalimschy
0cea28a785
better error messages for 'lua_checkversion'
2009-02-19 14:15:13 -03:00
Roberto Ierusalimschy
d2ebdc045b
new macro 'lua_checkversion' to check whether core and application are
...
compatible
2009-02-18 14:20:56 -03:00
Roberto Ierusalimschy
81ede6bfce
using light userdata to represent "remote" states
2009-02-18 11:52:51 -03:00
Roberto Ierusalimschy
2b579b4b83
panic mode does not reset stack (so that panic function can gather
...
debug information from it)
2009-02-18 11:52:03 -03:00
Roberto Ierusalimschy
a1d0e1a11a
'log10' is deprecated now
2009-02-18 10:17:10 -03:00
Roberto Ierusalimschy
8975739839
better precision for log(x, 10)
2009-02-18 10:06:05 -03:00
Roberto Ierusalimschy
d07abcc6c7
finalizers always called protected
2009-02-17 16:47:58 -03:00
Roberto Ierusalimschy
189378142a
buffer creation ensures buffer space plus MINSTACK in the stack
2009-02-17 11:31:16 -03:00
Roberto Ierusalimschy
82749b765e
'db_errorfb' changed to 'db_traceback' for consistency
2009-02-17 10:21:28 -03:00
Roberto Ierusalimschy
2b590aea40
no more '__len' metamethod for strings
2009-02-16 17:09:28 -03:00
Roberto Ierusalimschy
547e47649f
'luaL_typeerror' spelled right
2009-02-13 17:39:34 -02:00
Roberto Ierusalimschy
41dd32e18e
comment (should not use 'go trhough' when simply using multiple labels)
2009-02-11 16:25:20 -02:00
Roberto Ierusalimschy
5d3cc5def8
'writestring' changed into a configurable macro
2009-02-07 10:23:15 -02:00
Roberto Ierusalimschy
53db607963
avoid using 'fputs' in 'print' to avoid problems with embedded zeros
2009-02-06 16:38:47 -02:00
Roberto Ierusalimschy
cbf0c7a103
check for invalid use of '%' in replacement string in 'string.gsub'
2009-02-03 17:39:19 -02:00
Roberto Ierusalimschy
4c399c5dfb
detail (MAXSRC changed to LUA_IDSIZE)
2008-12-26 09:55:57 -02:00
Roberto Ierusalimschy
b472098493
concat TM can yield
2008-11-06 10:43:51 -02:00
Roberto Ierusalimschy
84b3daebbd
generic for coded as two dedicated instructions to simplify resumption
2008-10-30 13:39:30 -02:00
Roberto Ierusalimschy
f6978173e0
yields accross metamethods and for iterators (except for __concat)
2008-10-28 14:53:16 -02:00
Roberto Ierusalimschy
e02483dbc0
whole build depends on 'makefile' itself + better format for warning
...
options
2008-10-28 14:52:00 -02:00
Roberto Ierusalimschy
9e58e0df8f
some cleaning
2008-10-28 10:55:00 -02:00
Roberto Ierusalimschy
690efef3de
detail (added 'UNUSED' to unused argument)
2008-10-28 10:54:25 -02:00
Roberto Ierusalimschy
b9e92c8b0d
updating header dependencies
2008-10-03 13:40:56 -03:00
Roberto Ierusalimschy
4376c9bc5f
more specific test to avoid calling luaF_close when function returns
2008-09-09 10:53:02 -03:00
Roberto Ierusalimschy
f94cd2201c
better control of call status through CallInfo
2008-08-26 10:27:42 -03:00
Roberto Ierusalimschy
fdbb243ff9
first steps towards yielding through longjump
2008-08-13 14:02: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
394646891c
new field 'status' in CallInfo structure
2008-08-13 14:01:33 -03:00
Roberto Ierusalimschy
d69aa51088
added missing parentheses around function names
2008-08-13 11:08:49 -03:00
Roberto Ierusalimschy
afe849c9b4
change in error message
2008-08-06 10:38:32 -03:00
Roberto Ierusalimschy
ccd678ea3e
'module' may change the environment of a C function +
...
internal macro 'svalue' is wrong
2008-08-06 10:32:45 -03:00
Roberto Ierusalimschy
bb92ef23cb
bug: string at the end of TString must consider the entire TString
...
entity, not only its 'tsv' part
2008-08-05 16:26:23 -03:00
Roberto Ierusalimschy
bb48f456d9
bug: 'module' now checks that is caller is a Lua function
2008-08-05 16:25:42 -03:00
Roberto Ierusalimschy
df802dc74b
larger alignment requirement helps to uncover some kinds of bugs
2008-08-05 16:24:46 -03:00
Roberto Ierusalimschy
e23da9edee
GC step does not unblock collector (when it is blocked by "stop")
2008-08-01 14:01:16 -03:00
Roberto Ierusalimschy
4db2cddeee
LUA_COMPAT -> LUA_COMPAT_API (more specific)
2008-07-18 16:58:10 -03:00
Roberto Ierusalimschy
f9dec5fc84
do not use compatibility macros in Lua
2008-07-11 14:51:01 -03:00
Roberto Ierusalimschy
6b8725b0ee
new macro LUA_COMPAT to control some compatibility macros
2008-07-11 14:50:31 -03:00
Roberto Ierusalimschy
6955666290
'string.byte' gets confused with some out-of-range negative indices +
...
user-requested GC step may loop forever
2008-07-11 14:27:41 -03:00
Roberto Ierusalimschy
5298392c5a
bug: GC step could loop forever under very particular circumstances
2008-07-04 15:27:11 -03:00
Roberto Ierusalimschy
1ceec74370
useless test removed (pointed by lint)
2008-07-03 11:25:05 -03:00
Roberto Ierusalimschy
2a84c29bc3
comment about exported function not used by Lua
2008-07-03 11:24:36 -03:00
Roberto Ierusalimschy
4d8a1103d3
useless #define removed (pointed by lint)
2008-07-03 11:24:11 -03:00
Roberto Ierusalimschy
202de59254
useless #include removed (pointed by lint)
2008-07-03 11:23:35 -03:00
Roberto Ierusalimschy
f858a155c2
identation error (pointed by lint)
2008-07-03 11:21:41 -03:00
Roberto Ierusalimschy
9e7de9473c
message from -v option goes to stdout, as it is not an error message
2008-06-26 16:47:51 -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
1527d8f00d
GC called after errors now are called after showing error message (to
...
avoid problems when there are other errors during GC itself)
2008-06-26 16:40:12 -03:00
Roberto Ierusalimschy
8efaf8af81
added a comment about warnings for __attribute__(visibility) in some
...
elf targets
2008-06-25 12:27:12 -03:00
Roberto Ierusalimschy
c3525610fe
bug: when closing the state, 'luaC_separateudata' might mark
...
userdata in the wrong phase of collection, therefore avoiding
their traversal
2008-06-23 19:07:44 -03:00
Roberto Ierusalimschy
7ba62e2985
code reorganization (only changed comments and order of functions)
2008-06-23 13:51:28 -03:00
Roberto Ierusalimschy
8fd28611d5
outdated comment
2008-06-23 13:51:08 -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
480a1da34a
when error is 'bad self' original message probably makes no sense, so
...
it is better not to show it.
2008-06-13 15:45:35 -03:00
Roberto Ierusalimschy
59e2973335
removed static variable lua_state (not used)
2008-06-13 14:07:10 -03:00
Roberto Ierusalimschy
5d09be4832
by default, 'os.exit' closes current state
2008-06-13 13:59:00 -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
eb8ac6e2a0
'luaL_testudata' does not leave garbage on the stack in case of failure
2008-06-12 11:37:27 -03:00
Roberto Ierusalimschy
b1203e036d
'posrelat' avoids problems with -(-2^31)
2008-06-12 11:21:18 -03:00
Roberto Ierusalimschy
92a0d4c67f
extra options in 'testC' for newmetatable and testudata
2008-06-12 11:20:49 -03:00
Roberto Ierusalimschy
5fa55df2ca
updated years in some comments/strings
2008-05-09 13:51:44 -03:00
Roberto Ierusalimschy
a3af42de8e
patch for "blow stack" bug
2008-05-08 13:55:08 -03:00
Roberto Ierusalimschy
198be23f36
added structure for local-variable information to allow extra
...
checkings if needed
2008-05-08 12:44:51 -03:00
Roberto Ierusalimschy
24359ae294
'string.find' cannot find things after subject's end
2008-04-14 12:54:59 -03:00
Roberto Ierusalimschy
6c84722afa
make default GC behavior a little more agressive
...
(to avoid falling behind memory consumption)
2008-04-07 15:58:42 -03:00
Roberto Ierusalimschy
facb0519a0
two bugs: invalid boolean values in constant table + too deep recursion
...
when reading nested functions
2008-04-07 15:44:23 -03:00
Roberto Ierusalimschy
ffdca3522e
'table.sort' detects invalid order function before calling it
...
for nil elements
2008-04-07 15:43:00 -03:00
Roberto Ierusalimschy
4d7469b610
avoid constant folding for -0 (to avoid it colapsing to 0)
2008-04-07 15:41:47 -03:00
Roberto Ierusalimschy
2b84e36b93
patches for some bugs
2008-04-04 22:31:59 -03:00
Roberto Ierusalimschy
85bda9eef5
bugs: precheck must use check (instead of assert) and ensures that
...
code size is at least 1
2008-04-02 16:14:16 -03:00
Roberto Ierusalimschy
a4d3080fe3
SETLIST extra argument now is an "instruction" (OP_EXTRAARG)
2008-04-02 14:38:54 -03:00
Roberto Ierusalimschy
5627d51e05
corrected error message ("too many constants" -> "too many functions")
2008-04-02 14:19:22 -03:00
Roberto Ierusalimschy
e64b0cada8
several bugs related to precompiled code
2008-04-01 16:17:48 -03:00
Roberto Ierusalimschy
7316d61a66
'coroutine.running' should work for the main thread too
2008-02-25 11:33:57 -03:00
Roberto Ierusalimschy
e2b366c760
userdata with finalizers are kept in a separated list
2008-02-19 15:55:09 -03:00
Roberto Ierusalimschy
fa19baab7f
proxies must be created with a __gc field in their metatables to work
...
properly with new semantics for finalizers
2008-02-19 15:54:09 -03:00
Roberto Ierusalimschy
2f8351fe48
turn off optimizations when testing
2008-02-15 15:44:34 -02:00
Roberto Ierusalimschy
32d42bdcdc
bugs: lua_checkstack may have arithmetic overflow for large 'size' +
...
unpack with maximum indices may crash due to arithmetic overflow
2008-02-14 14:51:57 -02:00
Roberto Ierusalimschy
843d53aabb
'table.concat' may get confused with too large limits
2008-02-14 14:03:27 -02:00
Roberto Ierusalimschy
5ac3386888
bug: unpack with maximum indices may crash due to arithmetic overflow
2008-02-14 14:03:09 -02:00
Roberto Ierusalimschy
6d182faab6
bug: lua_checkstack may have arithmetic overflow for large 'size'
2008-02-14 14:02:58 -02:00
Roberto Ierusalimschy
f86f4116c8
micro-optimization: avoid one API call in 'read_chars'
2008-02-12 15:05:36 -02:00
Roberto Ierusalimschy
7f69f0efb0
remove of useless test in 'read_chars' (if n == 0 then the resulting
...
string cannot be empty).
2008-02-12 14:51:03 -02:00
Roberto Ierusalimschy
f6cab9666c
corrected name of 'Patrick Donnelly'
2008-02-12 14:42:46 -02:00
Roberto Ierusalimschy
3deb38814d
added assertions checking maximum number of upvalues
2008-02-12 11:34:12 -02:00
Roberto Ierusalimschy
3b5b14a085
LUAI_MAXCSTACK must be smaller than -LUA_REGISTRYINDEX +
...
coroutine.resume pushes element without ensuring stack size
2008-02-11 17:18:21 -02:00
Roberto Ierusalimschy
aec671c126
maximum C stack should reserve some values for pseudo-indices
2008-02-11 17:17:19 -02:00
Roberto Ierusalimschy
dd92af69db
bug: pseudo-indices should be linked to maximum C stack size
2008-02-11 17:16:02 -02:00
Roberto Ierusalimschy
015e973899
bug: auxresume should reserve stack space for boolean result
2008-02-11 17:14:52 -02: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
5f0a2f6248
more options for 'kinds' of Garbage Collection + more agressive
...
shrinking of stacks and string hash
2008-02-11 13:46:03 -02:00
Roberto Ierusalimschy
a73930228a
more options for 'kinds' of Garbage Collection
2008-02-11 13:45:30 -02:00
Roberto Ierusalimschy
a76fa25199
'ceillog2' now is exported (other modules may need it)
2008-01-30 16:05:23 -02:00
Roberto Ierusalimschy
dd3519ab89
comment (LUA_GLOBALSINDEX does not need write barrier in lua_replace)
2008-01-25 11:42:12 -02:00
Roberto Ierusalimschy
3a515df086
debug.sethook/gethook may overflow the thread's stack
2008-01-21 12:41:19 -02:00
Roberto Ierusalimschy
74897bc52f
bug: debug.sethook/gethook may overflow thread's stack
2008-01-21 11:37:08 -02:00
Roberto Ierusalimschy
e7c989baf1
avoid calling "tail return" hooks if the hook itself turns off the event
2008-01-18 20:36:50 -02:00
Roberto Ierusalimschy
7a3c8314ac
small bug (see http://lua-users.org/lists/lua-l/2007-08/msg00350.html )
2008-01-18 15:14:47 -02:00
Roberto Ierusalimschy
6f8257ec5f
it seems useless trying to avoid this warning...
2008-01-18 13:37:10 -02:00
Roberto Ierusalimschy
87b0191753
better definition for LUAI_MAXCSTACK
2008-01-17 14:24:38 -02:00
Roberto Ierusalimschy
56c17ba4c7
detail
2008-01-17 14:24:30 -02:00
Roberto Ierusalimschy
daddc57abd
luaL_tostring -> luaL_tolstring (more generic)
2008-01-03 15:07:59 -02:00
Roberto Ierusalimschy
f9cdd09191
larger limit for MAXCSTACK (plus removing of some useless definitions)
2008-01-02 14:36:19 -02:00
Roberto Ierusalimschy
47b4858357
detail ('name' of baselib is "_G")
2008-01-02 14:16:28 -02:00
Roberto Ierusalimschy
b8d23d6e07
option to use Sun compiler (on lhf account)
2007-12-27 10:59:43 -02:00
Roberto Ierusalimschy
fdecdd0cec
stand-alone interpreter shows incorrect error message when the
...
'message' is a coroutine (already fixed in 5.2)
2007-12-27 10:58:29 -02:00
Roberto Ierusalimschy
fabdaa37b6
'lua_pushfstring' raises an error if called with invalid format
2007-12-19 15:24:38 -02:00
Roberto Ierusalimschy
bc82b4d78a
new function 'package.searchpath'
2007-12-12 12:36:12 -02:00
Roberto Ierusalimschy
dae850e0ee
details
2007-12-08 09:54:32 -02:00
Roberto Ierusalimschy
abcc124df0
BUG: lua_setfenv may crash if called over an invalid object
2007-11-28 16:27:38 -02:00
Roberto Ierusalimschy
b4164a9aa7
details
2007-11-28 16:25:17 -02:00
Roberto Ierusalimschy
9f0d62ad9f
BUG: table.remove removes last element of a table when given
...
an out-of-bound index
2007-11-26 14:57:33 -02:00
Roberto Ierusalimschy
64ecf24210
detail
2007-11-26 14:56:11 -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
788506dd58
detail
2007-11-12 12:10:09 -02:00
Roberto Ierusalimschy
62790ab15d
detail
2007-11-09 16:55:07 -02:00
Roberto Ierusalimschy
ad60b3ead7
avoid the use of "exotic" libc functions
2007-11-09 16:54:25 -02:00
Roberto Ierusalimschy
5e8dd55574
first implementation of ephemerons
2007-10-31 13:41:19 -02:00
Roberto Ierusalimschy
0e961ad47a
some changes toward ephemerons
2007-10-29 14:51:20 -02:00
Roberto Ierusalimschy
c06cc60946
BUG: 'gsub' may go wild when wrongly called without its third
...
> argument and with a large subject.
2007-10-29 13:51:10 -02:00
Roberto Ierusalimschy
2fa476655f
detail
2007-10-25 17:31:05 -02:00
Roberto Ierusalimschy
7a78495f31
avoid problems with 'ptrdiff_t'
2007-10-25 17:30:36 -02:00
Roberto Ierusalimschy
3138afbe2e
parser should not call 'luaX_lexerror'
2007-10-25 14:45:47 -02:00
Roberto Ierusalimschy
4eef0aaad1
detail
2007-10-18 09:01:52 -02:00
Roberto Ierusalimschy
ab09732986
new metamethods for '__pairs' and '__ipairs'
2007-10-17 15:26:39 -02:00
Roberto Ierusalimschy
b7fa64565a
27 is not a prime number :(
2007-09-30 10:09:43 -03:00
Roberto Ierusalimschy
2622ed2528
better way to handle redefinitions of 'localeconv'
2007-09-14 10:27:04 -03:00
Roberto Ierusalimschy
9cb0607f6f
avoid warnings about exit; return
2007-09-14 10:26:28 -03:00
Roberto Ierusalimschy
8998032f66
detail
2007-09-14 10:26:03 -03:00
Roberto Ierusalimschy
80b4753539
better error message for 'concat'
2007-09-12 17:53:24 -03:00
Roberto Ierusalimschy
fe0838cd1c
tables and strings respect __len metamethod
2007-09-10 14:59:32 -03:00
Roberto Ierusalimschy
8acaa2ce07
An error in a module loaded through the '-l' option
...
shows no traceback.
2007-09-05 14:18:27 -03:00
Roberto Ierusalimschy
c676f13e1a
stand-alone error-message details
2007-09-05 14:17:39 -03:00
Roberto Ierusalimschy
9b47cee8b2
better to flush all files before starting new process with popen
2007-08-30 13:13:13 -03:00
Roberto Ierusalimschy
47e666c090
no need for ctype.h
2007-08-10 09:56:02 -03:00
Roberto Ierusalimschy
3059579253
detail
2007-08-09 17:29:15 -03:00
Roberto Ierusalimschy
72c2f75648
detail (LUA_COPYRIGHT includes release number)
2007-08-07 13:53:40 -03:00
Roberto Ierusalimschy
ec68ed66ed
detail
2007-08-01 09:17:29 -03:00
Roberto Ierusalimschy
f6a81dbe97
BUG: too many variables in an assignment may cause a C stack overflow
2007-07-31 16:39:52 -03:00
Roberto Ierusalimschy
3904a66ab0
'debug' library must be required before being used
2007-06-22 13:59:11 -03:00
Roberto Ierusalimschy
ffc5f78229
detail
2007-06-22 12:39:34 -03:00
Roberto Ierusalimschy
3f78748ef3
traceback function moved to auxlib
2007-06-22 12:33:54 -03:00
Roberto Ierusalimschy
d26bfb5ae4
"spacial" reorganization to keep related functions in groups
2007-06-21 11:09:59 -03:00
Roberto Ierusalimschy
8d3dd04137
clearing some old compatibility code
2007-06-21 10:52:27 -03:00
Roberto Ierusalimschy
791d8d8585
detail
2007-06-21 10:50:53 -03:00
Roberto Ierusalimschy
e85515958b
clearing some old compatibility code
2007-06-21 10:48:04 -03:00
Roberto Ierusalimschy
dc59444cd1
strong collision for very small numbers used as table keys
2007-06-19 17:23:29 -03:00
Roberto Ierusalimschy
6c042e17b1
avoid boolean equality (tricky for some compilers)
2007-06-19 16:48:15 -03:00
Roberto Ierusalimschy
18a583306b
patch may be a little simpler
2007-05-29 16:05:25 -03:00
Roberto Ierusalimschy
fc8d077612
bug: wrong error message in some concatenations
2007-05-29 15:59:59 -03:00
Roberto Ierusalimschy
e64fcb9d94
bug: recursive coroutines may overflow C stack
2007-05-25 14:13:47 -03:00
Roberto Ierusalimschy
6c0a9a272e
assignment of nil to parameter may be optimized away
...
__concat metamethod converts numbers to strings
loadlib.c should not access Lua internals
code generated for "-nil", "-true", and "-false" is wrong
Count hook may be called without being set
2007-05-16 12:39:08 -03:00
Roberto Ierusalimschy
01fa1bc114
luaL_testudata (a luaL_checkudata that does not raise errors) is
...
very needed.
2007-05-15 15:46:12 -03:00
Roberto Ierusalimschy
aa003eba8e
details
2007-05-11 14:28:56 -03:00
Roberto Ierusalimschy
becf19feef
better names for metamethods in debug information
2007-05-09 12:49:36 -03:00
Roberto Ierusalimschy
81fc3c4f45
bug: code generated for "-nil", "-true", and "-false" is wrong
2007-05-04 15:41:49 -03:00
Roberto Ierusalimschy
e7fb0d8a6f
'os.date' checks arguments before passing them to 'strftime'
2007-05-03 17:49:29 -03:00
Roberto Ierusalimschy
4eb49163c6
error handler in 'lua.c' tries '__tostring' metamethod if error
...
message is not a string
2007-04-26 17:39:38 -03:00
Roberto Ierusalimschy
79cb336d74
does not allow standard files to be closed
2007-04-19 17:22:32 -03:00
Roberto Ierusalimschy
38063345ae
several details
2007-04-19 17:21:53 -03:00
Roberto Ierusalimschy
ae00b3a76f
another way to normalize -0 that avoids problems with very small
...
numbers (adding 1 turns them all into 1)
2007-04-18 16:24:35 -03:00
Roberto Ierusalimschy
619be354c8
lua_pushstring/pushlstring return string
2007-04-17 10:19:53 -03:00
Roberto Ierusalimschy
94d40f3980
luaO_log2 can be private to ltable.c
2007-04-10 09:18:17 -03:00
Roberto Ierusalimschy
585b81f91e
remove of a non-used test function
2007-04-10 09:17:52 -03:00
Roberto Ierusalimschy
5f4f0d4a63
no more optimization to avoid LOADNIL at function start
2007-03-27 11:11:38 -03:00
Roberto Ierusalimschy
8e36e1fe49
details (randomseed calls rand once to dischard first value)
2007-03-27 09:37:00 -03:00
Roberto Ierusalimschy
97505caa64
detail
2007-03-26 15:35:34 -03:00
Roberto Ierusalimschy
df50c84ee0
BUG: loadlib should not use Lua internals (lobject.h)
2007-03-26 12:57:35 -03:00
Roberto Ierusalimschy
1a455acc81
two small bugs: some metamethods do not accept callable non-function
...
objects + __concat converts numbers to strings before calling metamethod
2007-03-26 12:56:23 -03:00
Roberto Ierusalimschy
60bc151ed7
patch for last bug
2007-03-09 15:51:32 -03:00
Roberto Ierusalimschy
3b19bd4d57
bug: wrong code when constant is coded after it should be
2007-03-09 15:50:56 -03:00
Roberto Ierusalimschy
08f902cf49
better documentation for auxiliary functions (that should be called only
...
through specific macros).
2007-02-09 11:04:52 -02:00
Roberto Ierusalimschy
d3c304e92e
BUG: setfenv accepts invalid argument
2007-02-09 10:40:21 -02:00
Roberto Ierusalimschy
3bf0292cd5
two new bugs + one new patch
2007-02-09 10:39:52 -02:00
Roberto Ierusalimschy
a7861d9d66
new year...
2007-02-07 15:54:52 -02:00
Roberto Ierusalimschy
d62a21b9d3
when formatting with '%q', all control characters are coded
...
as \nnn.
2007-02-07 15:53:08 -02:00
Roberto Ierusalimschy
cf86576a83
new function luaL_tostring
2007-02-07 15:51:21 -02:00
Roberto Ierusalimschy
92dc64e121
more regularity in the use of quotes in error messages
2007-02-07 15:49:18 -02:00
Roberto Ierusalimschy
593bfc9668
should not manipulate NULL pointers (even without accessing them)
2007-02-07 15:48:52 -02:00
Roberto Ierusalimschy
850c60e81b
detail for windows
2007-02-07 15:46:20 -02:00
Roberto Ierusalimschy
3d480b04a5
more specific ident labels
2007-02-07 12:28:00 -02:00
Roberto Ierusalimschy
c36e2265d9
detail (tab->space)
2006-11-30 09:25:40 -02:00
Roberto Ierusalimschy
a68df3898d
detail
2006-11-22 09:43:47 -02:00
Roberto Ierusalimschy
4d7cfff6df
comments
2006-11-22 09:02:03 -02:00
Roberto Ierusalimschy
be822a5f1c
xpcall now may get arguments to function to be called
2006-10-24 16:46:12 -03:00
Roberto Ierusalimschy
9f5a052c27
error message
2006-10-24 10:31:48 -03:00
Roberto Ierusalimschy
fc875334fd
detail
2006-10-20 16:30:53 -03:00
Roberto Ierusalimschy
80a267b130
avoid $URL for ident; it is reserved in subversion
2006-10-17 17:00:07 -03:00
Roberto Ierusalimschy
3182ac69a7
towards 5.2 + detail in authors + avoiding reverse plicks
2006-10-17 16:59:04 -03:00
Roberto Ierusalimschy
dead3858b8
detail
2006-10-16 11:38:38 -03:00
Roberto Ierusalimschy
afa0d0ac0d
new constant LUA_OK
2006-10-10 14:40:17 -03:00
Roberto Ierusalimschy
742b8be0c1
detail
2006-10-10 14:39:00 -03:00
Roberto Ierusalimschy
285f926140
avoid using index 0 for free list of references (because it is not
...
as efficient as index 1...)
2006-09-25 12:35:00 -03:00
Roberto Ierusalimschy
3c8865cf66
detail
2006-09-22 17:24:38 -03:00
Roberto Ierusalimschy
569a326931
small optimization for ""..x
2006-09-19 11:06:45 -03:00
Roberto Ierusalimschy
d1ef7e0ec6
avoid local "pc" in interpreter loop (tricky optimization with no real gain)
2006-09-19 10:57:50 -03:00
Roberto Ierusalimschy
d513c3c66b
bug: os.date throws error when result is the empty string
2006-09-19 10:57:08 -03:00
Roberto Ierusalimschy
93d3c8450c
bug: string.format("%") reads past the string
2006-09-18 13:33:14 -03:00
Roberto Ierusalimschy
8667f29c3b
behavior of 'strchr(x, 0)' is ill defined.
2006-09-18 13:06:41 -03:00
Roberto Ierusalimschy
d22526ec30
'lua_strlen' is for compatibility only
2006-09-18 11:03:18 -03:00
Roberto Ierusalimschy
bd869c7b31
details
2006-09-14 15:42:28 -03:00
Roberto Ierusalimschy
d5a23dde90
little better error messages for internal arrays overflows
2006-09-14 09:59:06 -03:00
Roberto Ierusalimschy
a7c9e45c64
avoid trailing white spaces
2006-09-11 11:07:24 -03:00
Roberto Ierusalimschy
cedd2092eb
'coroutine.running' should return nil (instead of nothing) for main thread
2006-09-11 11:07:24 -03:00
Roberto Ierusalimschy
c473818017
avoid "too complex" conditional expression (some compilers get confused...)
2006-09-11 09:44:56 -03:00
Roberto Ierusalimschy
6087e67771
no more compatibility option for long strings
2006-08-30 10:19:58 -03:00
Roberto Ierusalimschy
93bf618504
BUG: there is only one C stack, so nCcalls must be global
2006-08-15 16:59:20 -03:00
Roberto Ierusalimschy
dfe2f1eeff
macros luai_num* take a state L (when available) as argument, to allow
...
them to generate errors (and other facilities)
2006-08-07 16:14:30 -03:00
Roberto Ierusalimschy
ca7e5b5cb6
wrong message error in some cases involving closures
2006-08-07 16:04:06 -03:00
Roberto Ierusalimschy
5019b2dd20
math.log now accepts an optional base
2006-08-07 16:01:56 -03:00
Roberto Ierusalimschy
33e7bc88f8
comment
2006-08-04 10:34:37 -03:00
Roberto Ierusalimschy
fa0c03aaa6
details
2006-07-14 13:22:24 -03:00
Roberto Ierusalimschy
3fa47c5dc1
bugs now are against 5.1.1
2006-07-13 11:37:36 -03:00
Roberto Ierusalimschy
0782416a74
bug: wrong limit for list constructors
2006-07-12 16:02:50 -03:00
Roberto Ierusalimschy
3ca9af51a4
emergency garbage collector (core forces a GC when allocation fails)
2006-07-11 12:53:29 -03:00
Roberto Ierusalimschy
c7b89dd280
small bug: should not use string after popping it
2006-07-03 17:16:49 -03:00
Roberto Ierusalimschy
74832b2a10
detail
2006-06-23 13:09:15 -03:00
Roberto Ierusalimschy
ee41bc03ab
details
2006-06-22 13:12:59 -03:00
Roberto Ierusalimschy
98194db429
details
2006-06-09 14:31:14 -03:00
Roberto Ierusalimschy
fad7582c9a
explicit test for common error (due to compatibility issue)
2006-06-07 09:37:17 -03:00
Roberto Ierusalimschy
a62fca1ebb
BUG: debug hooks may get wrong when mixed with coroutines
2006-06-05 16:36:45 -03:00
Roberto Ierusalimschy
2b5c1f99e5
small simplifications
2006-06-05 16:35:57 -03:00
Roberto Ierusalimschy
e2dc5f5d15
extra assertion
2006-06-05 12:58:59 -03:00
Roberto Ierusalimschy
ed64346b9d
details
2006-06-05 12:57:59 -03:00
Roberto Ierusalimschy
475b0ecbf1
new macro LUA_RELEASE
2006-06-02 12:34:00 -03:00
Roberto Ierusalimschy
414359b2f1
new version number
2006-05-31 13:50:40 -03:00
Roberto Ierusalimschy
0079efc479
bug: collector did not compensate enough for userdata with finalizers
2006-05-24 11:34:06 -03:00
Roberto Ierusalimschy
ad0765b4f0
subtle problem with the garbage collector
2006-05-24 11:33:49 -03:00
Roberto Ierusalimschy
20f4bbdc3a
does not accept garbage after options (e.g., -ixxx)
2006-05-24 11:16:39 -03:00
Roberto Ierusalimschy
c408158047
only destroy state after running all finalizers
2006-05-24 11:15:50 -03:00
Roberto Ierusalimschy
55e323190e
files should not be operated after fclose, even when fclose fails
2006-05-08 17:14:16 -03:00
Roberto Ierusalimschy
fe8f4c06f1
detail (better error message for invalid format)
2006-04-26 17:41:19 -03:00
Roberto Ierusalimschy
c351392940
details
2006-04-26 15:19:49 -03:00
Roberto Ierusalimschy
18330b6091
lua_dostring/lua_dofile should return any values returned by the chunk
2006-04-12 17:31:15 -03:00
Roberto Ierusalimschy
8487913697
BUG: option '%q' for string.format does not handle '\r' correctly
2006-04-12 17:13:52 -03:00
Roberto Ierusalimschy
672bb67ee6
environment variable names should be configurable
2006-04-10 15:27:23 -03:00
Roberto Ierusalimschy
90df6b7a54
detail
2006-03-23 15:23:32 -03:00
Roberto Ierusalimschy
0238a0b01e
BUG: luaL_checkudata may show wrong error message
2006-03-21 16:31:09 -03:00
Roberto Ierusalimschy
1ae0b6c0bf
BUG: should copy the union, not (some of) its fields
2006-03-21 16:28:49 -03:00
Roberto Ierusalimschy
e1dda047b2
unused macro
2006-03-21 16:28:03 -03:00
Roberto Ierusalimschy
2c8206d448
bug in Lua 4.0.2: weak tables that survive one collection are never collected
2006-03-20 09:49:30 -03:00
Roberto Ierusalimschy
ae76307847
comment
2006-03-14 16:04:44 -03:00
Roberto Ierusalimschy
3d61c31e5a
'lparser.h' should not include 'ltable.h'
2006-03-09 15:15:48 -03:00
Roberto Ierusalimschy
44a9bd6a8c
detail
2006-03-09 15:08:22 -03:00
Roberto Ierusalimschy
69ea087dff
small change to strip file names when stripping debug information
2006-02-17 13:51:03 -02:00
Roberto Ierusalimschy
c05aaf3bf0
avoid warning in OS X - ansi
2006-02-10 15:44:06 -02:00
Roberto Ierusalimschy
298ae7e230
complete support for hexadecimal constants
2006-02-10 15:43:52 -02:00
Roberto Ierusalimschy
6316a866a3
compiler warning
2006-02-06 16:28:16 -02:00
Roberto Ierusalimschy
ea2cc2bc47
small improvements for allignments
2006-02-06 16:27:59 -02:00
Roberto Ierusalimschy
64205e91a3
empty string may cause out-of-bound access
2006-01-28 10:59:13 -02:00
Roberto Ierusalimschy
8173688542
detail
2006-01-27 11:54:39 -02:00
Roberto Ierusalimschy
3ef5a6797f
detail
2006-01-23 18:06:19 -02:00
Roberto Ierusalimschy
9e6e43984d
details
2006-01-23 17:51:43 -02:00
Roberto Ierusalimschy
baffc37f5c
detail
2006-01-18 09:49:12 -02:00
Roberto Ierusalimschy
440113bbe8
unused macro removed
2006-01-18 09:37:34 -02:00
Roberto Ierusalimschy
73ebc5d8f6
compat code should keep compatibility
2006-01-16 10:42:21 -02:00
Roberto Ierusalimschy
a666752b1d
detail
2006-01-13 17:36:28 -02:00
Roberto Ierusalimschy
f8b7a5581e
avoid unnecessary exports
2006-01-10 11:13:06 -02:00
Roberto Ierusalimschy
ffb798e1e2
avoids type punning for table keys
2006-01-10 10:51:53 -02:00
Roberto Ierusalimschy
fa936f8fa9
detail
2006-01-10 10:50:13 -02:00
Roberto Ierusalimschy
dd1221582b
details
2006-01-10 10:50:00 -02:00
Roberto Ierusalimschy
bfdcbbcd76
small optimizations (lua_newtable -> lua_createtable)
2005-12-29 14:23:32 -02:00
Roberto Ierusalimschy
30eebb2d1c
detail (stop collector while openning libraries)
2005-12-29 10:30:16 -02:00
Roberto Ierusalimschy
0fd6466957
lua_assert is an internal matter, not to be configured
2005-12-27 15:12:00 -02:00
Roberto Ierusalimschy
6a516878e9
collectgarbage"count" returns kilobytes (where K = 1024)
2005-12-27 15:10:11 -02:00
Roberto Ierusalimschy
a486090a5c
copyright will be 2006
2005-12-27 15:09:50 -02:00
Roberto Ierusalimschy
0160591998
removal of dead code
2005-12-26 11:35:47 -02:00
Roberto Ierusalimschy
c505f341d6
small changes in casts
2005-12-22 14:19:56 -02:00
Roberto Ierusalimschy
428325baec
detail
2005-12-21 10:59:43 -02:00
Roberto Ierusalimschy
0561f71f0f
(much) better error messages for 'require'
2005-12-19 18:56:39 -02:00
Roberto Ierusalimschy
9fbefdf69c
integer formats in 'string.format' may need to operate with larger-than-int
...
types
2005-12-15 16:53:34 -02:00
Roberto Ierusalimschy
43c61fc113
details
2005-12-15 16:17:49 -02:00
Roberto Ierusalimschy
ea6b1b42c7
more robust way to test for decimal point separator
2005-12-08 13:50:54 -02:00
Roberto Ierusalimschy
87024e257d
details
2005-12-07 13:43:05 -02:00
Roberto Ierusalimschy
6cd461633d
clearer error message for uninstalled loadlib
2005-12-07 13:42:32 -02:00
Roberto Ierusalimschy
16fd4abaf6
corrects decimal point to follow current locale
2005-12-07 13:33:27 -02:00
Roberto Ierusalimschy
f26b85c5b7
small detail
2005-12-02 16:42:08 -02:00
Roberto Ierusalimschy
3592c08a2c
avoid printing two copyright messages with '-v -i' options
2005-11-28 12:44:48 -02:00
Roberto Ierusalimschy
db724e14e0
new macro luai_numisnan
2005-11-25 11:29:32 -02:00
Roberto Ierusalimschy
1702953293
new macro LUA_WIN + new macro luai_numisnan
2005-11-25 11:29:11 -02:00
Roberto Ierusalimschy
33b4dec1cb
no more "auto-detection"
2005-11-16 14:25:08 -02:00
Roberto Ierusalimschy
7dd10a1d7e
new macro LUA_USE_POSIX to control POSIX-related macros
2005-11-16 09:56:28 -02:00
Roberto Ierusalimschy
521a452f28
'mod' may also raise an error when applied to zero
2005-11-16 09:55:27 -02:00
Roberto Ierusalimschy
2753134a38
new versions by lhf
2005-11-16 09:55:07 -02:00
Roberto Ierusalimschy
cbbde11a8a
better position for lua_number2int (it is related to lua_Number)
2005-11-08 17:45:58 -02:00
Roberto Ierusalimschy
7b89cf3aeb
unused include's
2005-11-08 17:45:36 -02:00
Roberto Ierusalimschy
d2811e8097
simpler checking for numbers (strtod does the rest)
2005-11-08 17:45:14 -02:00
Roberto Ierusalimschy
e43e95553f
more privacy
2005-11-08 17:44:31 -02:00
Roberto Ierusalimschy
930018e273
lua_getlocal/setlocal work also for C locals and temporaries
2005-11-01 14:08:52 -02:00
Roberto Ierusalimschy
a160266c3d
details
2005-11-01 14:08:45 -02:00
Roberto Ierusalimschy
d4c99b2673
new function 'getregistry'
2005-11-01 14:08:32 -02:00
Roberto Ierusalimschy
88f9843eee
better error message
2005-10-26 11:28:19 -02:00
Roberto Ierusalimschy
9b5ae6faf9
better control of which values macros use
2005-10-25 11:36:28 -02:00
Roberto Ierusalimschy
caf3cfc6ac
try to ensure that macros actually use their arguments
2005-10-24 15:39:21 -02:00
Roberto Ierusalimschy
ff7638b0ed
VC warnings
2005-10-24 15:38:47 -02:00
Roberto Ierusalimschy
8e48ebb638
no more L in numer-operator macros (some functions that use those macros
...
have no access to L)
2005-10-24 15:37:52 -02:00
Roberto Ierusalimschy
c2bd68d2c3
detail
2005-10-24 15:37:33 -02:00
Roberto Ierusalimschy
201288b4df
small bug
2005-10-23 15:52:42 -02:00
Roberto Ierusalimschy
62367dda44
string.gsub accepts a table as the replacement value
2005-10-23 15:46:30 -02:00
Roberto Ierusalimschy
056b6a8ef4
more robust implementation for table.insert
2005-10-23 15:38:15 -02:00
Roberto Ierusalimschy
502d8f9a06
comments
2005-10-23 15:37:55 -02:00
Roberto Ierusalimschy
7f376e6ea8
do a complete garbage collection in case of errors
2005-10-21 11:48:31 -02:00
Roberto Ierusalimschy
053e873145
new macro luaL_opt to avoid evaluating defaults when no needed
2005-10-21 11:47:42 -02:00
Roberto Ierusalimschy
9f4211310f
more precision for gc count
2005-10-20 09:35:50 -02:00
Roberto Ierusalimschy
515d556832
access to metamethods and metafields should be raw
2005-10-20 09:35:25 -02:00
Roberto Ierusalimschy
ed7039024d
avoid some warnings
2005-10-19 11:05:11 -02:00
Roberto Ierusalimschy
5511bf6b9d
avoid comparisons between (void *) and (int *)
2005-10-17 16:01:51 -02:00
Roberto Ierusalimschy
86704cffe9
detail in usage message
2005-10-14 15:34:23 -03:00
Roberto Ierusalimschy
fa41fafa6e
reorganization of argument handling
2005-10-14 15:15:46 -03:00
Roberto Ierusalimschy
ebf646efb5
detail
2005-10-14 13:24:11 -03:00
Roberto Ierusalimschy
b3f81f1d1d
small bug when debugging dead threads
2005-10-14 13:23:33 -03:00
Roberto Ierusalimschy
a24eb3ef17
different organization for platform dependencies
2005-10-13 09:22:53 -03:00
Roberto Ierusalimschy
4385e2ada4
"conceptually", OP_TEST may change reg. A
2005-10-13 09:22:05 -03:00
Roberto Ierusalimschy
e9b06c506f
small optimization
2005-10-13 09:21:51 -03:00
Roberto Ierusalimschy
cd12ab2597
details (more uniform coding)
2005-10-13 09:21:26 -03:00
Roberto Ierusalimschy
e251e84e0f
constant folding optimizations
2005-10-09 17:05:48 -03:00
Roberto Ierusalimschy
e6bfbc38b5
'luaopen_package' was missing in new states
2005-10-06 17:47:32 -03:00
Roberto Ierusalimschy
d31c04c049
missing macros 'luai_userstate*'
2005-10-06 17:46:25 -03:00
Roberto Ierusalimschy
522481a788
avoid some warnings
2005-10-06 17:46:10 -03:00
Roberto Ierusalimschy
37b49aa451
detail
2005-10-06 17:44:22 -03:00
Roberto Ierusalimschy
0fa9b16148
details
2005-10-06 17:43:44 -03:00
Roberto Ierusalimschy
e41fb9a604
registry._LOADED created "on demand"
2005-10-03 11:36:45 -03:00
Roberto Ierusalimschy
5fc92cce12
registry._LOADED created "on demand" and baselib created as module _G
2005-10-03 11:36:45 -03:00
Roberto Ierusalimschy
6dd0c6ccbc
numeral expressions keep their values in struct 'expdesc'
2005-10-03 11:02:40 -03:00
Roberto Ierusalimschy
a77413acd0
include of math.h depends on luaconf
2005-10-03 11:01:26 -03:00
Roberto Ierusalimschy
5dbb870815
small optimization for local declarations without initializations
2005-09-30 11:23:33 -03:00
Roberto Ierusalimschy
ede19c9138
2005-09-30 11:21:56 -03:00
Roberto Ierusalimschy
9e88b336b4
unused assignment
2005-09-30 10:50:05 -03:00
Roberto Ierusalimschy
0fae476ed4
new function 'table.maxn'
2005-09-20 14:56:47 -03:00
Roberto Ierusalimschy
361a9adba7
smaller initial tables (for programs that create many states)
2005-09-20 14:55:53 -03:00
Roberto Ierusalimschy
d8f1cca16e
new function 'lua_setallocf'
2005-09-20 14:55:10 -03:00
Roberto Ierusalimschy
bf96d3fdd9
'string.find' as it was in 5.0
2005-09-19 10:49:12 -03:00
Roberto Ierusalimschy
c8c2e06899
'select' accepts negative indices
2005-09-16 15:22:48 -03:00
Roberto Ierusalimschy
8dcc6bc532
avoid the use of global lock
2005-09-14 14:48:57 -03:00
Roberto Ierusalimschy
38f585d271
separated macros for thread creation and state creation
2005-09-14 14:44:48 -03:00
Roberto Ierusalimschy
6887f91799
":" is not a good mark as it is not valid in Windows file names
2005-09-14 14:23:03 -03:00
Roberto Ierusalimschy
7fbbf1adc6
explicit macro to control use of _longjmp
2005-09-09 15:24:42 -03:00
Roberto Ierusalimschy
6dd3a73ca2
detail (macro evaluates twice its arguments)
2005-09-09 15:23:35 -03:00
Roberto Ierusalimschy
1e6a559b29
does not set isdst when undefined
2005-09-09 15:22:46 -03:00
Roberto Ierusalimschy
2d2f955763
detail
2005-09-09 15:16:28 -03:00
Roberto Ierusalimschy
669f6306be
small corrections
2005-09-06 14:21:03 -03:00
Roberto Ierusalimschy
2bcbd3c725
avoid 'PathRemoveFileSpec' (not very portable)
2005-09-06 14:20:25 -03:00
Roberto Ierusalimschy
5fa6604f00
detail
2005-09-06 14:20:11 -03:00
Roberto Ierusalimschy
ce67a9be31
avoid exporting undefined functions
2005-09-06 14:19:51 -03:00
Roberto Ierusalimschy
506c89cef8
just in case, flush all output
2005-09-06 14:19:33 -03:00
Roberto Ierusalimschy
8ead2ec358
wrong syntax for Windows-specific options
2005-09-02 16:53:25 -03:00
Roberto Ierusalimschy
c3cc4de3fd
small bug (zero is not error code)
2005-09-01 14:42:22 -03:00
Roberto Ierusalimschy
351f7dad6b
default for 'module' is opaque (with option 'seeall')
2005-08-31 20:17:29 -03:00
Roberto Ierusalimschy
3b19af44b0
new method to handle tests without values (negative values)
2005-08-29 17:49:21 -03:00
Roberto Ierusalimschy
3390f9a35a
detail
2005-08-26 14:36:32 -03:00
Roberto Ierusalimschy
9273fbd131
no more 'luaL_get/setfield' (replaced by more direct luaL_findtable)
2005-08-26 14:32:05 -03:00
Roberto Ierusalimschy
be666a662b
detail
2005-08-25 16:55:38 -03:00
Roberto Ierusalimschy
39cdbce23e
no more '-w' option + new way to check module existence
2005-08-25 12:39:16 -03:00
Roberto Ierusalimschy
8974b59e40
no more compatibility for {;} and similar syntax
2005-08-24 14:41:10 -03:00
Roberto Ierusalimschy
4ff1e5b4e1
details
2005-08-24 14:06:36 -03:00
Roberto Ierusalimschy
98296f6b45
some bugs related to stack reallocation
2005-08-24 13:15:49 -03:00
Roberto Ierusalimschy
23b79c5945
small changes to facilitate external C coroutines
2005-08-22 16:58:29 -03:00
Roberto Ierusalimschy
6fcd334ca0
small improvements
2005-08-22 15:54:49 -03:00
Roberto Ierusalimschy
43ad0637ca
small optimizations
2005-08-22 15:54:32 -03:00
Roberto Ierusalimschy
027e9e99ca
simpler implementation for userdata types
2005-08-18 17:36:26 -03:00
Roberto Ierusalimschy
3b828d9e48
luaL_setfield does a non-raw set
2005-08-18 13:04:05 -03:00
Roberto Ierusalimschy
68548a02d3
fancier code ;)
2005-08-17 17:09:31 -03:00
Roberto Ierusalimschy
2f2b4a42a9
luaL_checkudata raises an error if value is not correct
...
(like other luaL_check functions)
2005-08-17 16:05:04 -03:00
Roberto Ierusalimschy
074352911f
new coding for while and repeat (with new scoping for repeat)
2005-08-17 15:32:09 -03:00
Roberto Ierusalimschy
5e8a9e324c
luaL_openlib -> luaL_register, luaL_putchar -> luaL_addchar
2005-08-15 11:12:32 -03:00
Roberto Ierusalimschy
16ddf86168
luaL_openlib -> luaL_register and new function luaL_loadstring
2005-08-15 11:12:32 -03:00
Roberto Ierusalimschy
e4d369c9b7
comments
2005-08-12 10:34:15 -03:00
Roberto Ierusalimschy
42a662334a
simpler implementation for unary minus
2005-08-10 17:20:13 -03:00
Roberto Ierusalimschy
39c0f391c6
detail
2005-08-10 15:47:09 -03:00
Roberto Ierusalimschy
c7b4f44772
correct name to open package library
2005-08-10 15:06:58 -03:00
Roberto Ierusalimschy
44b19075c0
small changes (to easy integration with Coco)
2005-08-09 16:49:04 -03:00
Roberto Ierusalimschy
ab3dfa5594
store some configuration information
2005-08-09 14:58:09 -03:00
Roberto Ierusalimschy
62f786e08c
new version (and new copyright)...
2005-08-09 14:57:54 -03:00
Roberto Ierusalimschy
bbfd28959d
attempt to better control use of _longjmp
2005-08-09 14:57:29 -03:00
Roberto Ierusalimschy
894cd31c52
#string is primitive
2005-08-09 14:42:02 -03:00
Roberto Ierusalimschy
f01a95d4a0
detail
2005-08-09 09:30:19 -03:00
Roberto Ierusalimschy
680fc88cc2
a small bug
2005-08-04 10:37:38 -03:00
Roberto Ierusalimschy
d96f088a26
'lua_lock' and similars should be hard to use
2005-08-04 10:37:10 -03:00
Roberto Ierusalimschy
d8be9a6326
small changes
2005-08-01 12:05:09 -03:00
Roberto Ierusalimschy
95f3eefa5b
small optimization
2005-08-01 01:22:23 -03:00
Roberto Ierusalimschy
e82bdb24f3
new loader for "all-in-one" C packages
2005-08-01 01:21:17 -03:00
Roberto Ierusalimschy
1a343814d8
details
2005-07-31 14:12:32 -03:00
Roberto Ierusalimschy
280f7becb8
"%0" stands for the whole pattern (in gsub)
2005-07-31 13:47:34 -03:00
Roberto Ierusalimschy
d6ff5d9f46
searchpath is "private affair" of loadlib
2005-07-13 16:02:42 -03:00
Roberto Ierusalimschy
a05190fa3b
elimination of common code + better error message
2005-07-12 18:17:46 -03:00
Roberto Ierusalimschy
a569099b70
no more path for loadfile + function lists sorted
2005-07-12 15:15:11 -03:00
Roberto Ierusalimschy
20131e54d3
no more "getc" when testing if file exists
2005-07-12 11:32:48 -03:00
Roberto Ierusalimschy
80ac5e83fd
details (alphabetical order for list of functions)
2005-07-12 11:32:08 -03:00
Roberto Ierusalimschy
289b5dc67a
details (function list in alphabetical order)
2005-07-11 20:58:35 -03:00
Roberto Ierusalimschy
c2f065f405
detail
2005-07-11 15:48:02 -03:00
Roberto Ierusalimschy
b261cd110f
new macro for conversion double->int + small changes
2005-07-11 14:10:35 -03:00
Roberto Ierusalimschy
e4324f54b9
';;' in a path is replaced by default path + '!' (in Windows) is
...
replaced by executable's directory
2005-07-11 13:41:57 -03:00
Roberto Ierusalimschy
3d08aa591d
details
2005-07-11 13:41:51 -03:00
Roberto Ierusalimschy
0f30d00c87
warnings from Visual C
2005-07-11 11:01:37 -03:00
Roberto Ierusalimschy
e86dab2dae
details
2005-07-11 11:01:28 -03:00
Roberto Ierusalimschy
64b57db377
new test function for conversion from num to int
2005-07-11 11:00:59 -03:00
Roberto Ierusalimschy
575637319e
better recovery at panic
2005-07-11 11:00:31 -03:00
Roberto Ierusalimschy
87be01598b
warnings Visual C
2005-07-11 10:59:03 -03:00
Roberto Ierusalimschy
e84b11a494
avoid names starting with '_'
2005-07-09 10:22:34 -03:00
Roberto Ierusalimschy
bbf2cea9a1
more "polite" way to change a thread's environment
2005-07-07 12:48:29 -03:00
Roberto Ierusalimschy
b3f7a43019
lua_setfenv/lua_getfenv should also manipulate threads
2005-07-06 15:07:30 -03:00
Roberto Ierusalimschy
7f97ec286e
parent modules are also imported toghether with the module itself
2005-07-05 16:29:03 -03:00
Roberto Ierusalimschy
e82b41aac2
several small improvements
2005-07-05 11:31:45 -03:00
Roberto Ierusalimschy
ee1edd5734
detail
2005-07-05 11:31:20 -03:00
Roberto Ierusalimschy
8efb44b5e0
changes in 'string.find' and 'string.gfind' (new 'string.match' and
...
'string.gmatch')
2005-07-05 11:30:38 -03:00
Roberto Ierusalimschy
f7720bebe3
more precise way to check incomplete lines
2005-06-28 10:01:50 -03:00
Roberto Ierusalimschy
69cc0a12fe
small bug
2005-06-28 10:01:31 -03:00
Roberto Ierusalimschy
2f0955b99b
detail
2005-06-27 14:24:40 -03:00
Roberto Ierusalimschy
999d55d887
several updates
2005-06-13 18:20:28 -03:00
Roberto Ierusalimschy
1f9f97e3cf
'math.mod' -> 'math.fmod'
2005-06-13 18:20:14 -03:00
Roberto Ierusalimschy
34aac33c15
detail
2005-06-13 18:17:59 -03:00
Roberto Ierusalimschy
3c2cf9db67
some extra consistency checks
2005-06-13 11:39:19 -03:00
Roberto Ierusalimschy
0b71bfd6af
syntax for length changed from '*' to '#'
2005-06-13 11:25:29 -03:00
Roberto Ierusalimschy
0d1685d751
bug: last tag is not the number of tags...
2005-06-13 11:19:00 -03:00
Roberto Ierusalimschy
bf2b342ac1
better control for compatibility code for varargs
2005-06-13 11:15:54 -03:00
Roberto Ierusalimschy
5fa2bec1f0
bug: current line should work for call hook
2005-06-13 11:15:22 -03:00
Roberto Ierusalimschy
746a1d612b
small bug (type error)
2005-06-07 15:53:45 -03:00
Roberto Ierusalimschy
3ad03b331d
optional size for 'setvbuf'
2005-06-06 15:42:21 -03:00
Roberto Ierusalimschy
86add535d8
'popen' is back
2005-06-06 10:30:52 -03:00
Roberto Ierusalimschy
d987cf1f81
new mark LUAI_DATA for extern data
2005-06-06 10:30:25 -03:00
Roberto Ierusalimschy
eca9fa02d2
small improvement
2005-06-03 17:16:16 -03:00
Roberto Ierusalimschy
e33d7bae45
__STRICT_ANSI__ -> LUA_ANSI (definition is independent of gcc)
2005-06-01 14:07:45 -03:00
Roberto Ierusalimschy
d628795940
lua_objsize -> lua_objlen (more compatible with use of `len´ in other
...
places [opcode name, metamethod index, etc.])
2005-05-31 11:34:02 -03:00
Roberto Ierusalimschy
05348d834b
better error message
2005-05-31 11:31:50 -03:00
Roberto Ierusalimschy
90de38bf1f
warnings in VS .Net
2005-05-31 11:25:18 -03:00
Roberto Ierusalimschy
e8a7ecb982
luaL_findstring -> luaL_checkoption
2005-05-25 10:21:26 -03:00
Roberto Ierusalimschy
38da9d568a
better use defined/undefined as flag values for macros
2005-05-20 16:09:05 -03:00
Roberto Ierusalimschy
f21e9c172f
details
2005-05-20 12:53:42 -03:00
Roberto Ierusalimschy
67578ec51f
several small details
2005-05-17 16:49:15 -03:00
Roberto Ierusalimschy
c2bb9abcec
better quotes for strings in error messages
2005-05-16 18:19:00 -03:00
Roberto Ierusalimschy
da32450c3d
new API function `lua_tolstring'
2005-05-16 16:21:11 -03:00
Roberto Ierusalimschy
a2b78aad49
debug information for active lines
2005-05-16 15:45:15 -03:00
Roberto Ierusalimschy
c6293a76cc
LUA_DL_DLOPEN is for internal use; makefile should use LUA_USE_DLOPEN
2005-05-09 10:14:14 -03:00
Roberto Ierusalimschy
1ab2b93462
debug information for last line of a function definition
2005-05-05 17:47:02 -03:00
Roberto Ierusalimschy
6cf85dcc90
metatables for all types
2005-05-05 12:34:03 -03:00
Roberto Ierusalimschy
65f4a0f636
no more compatibility code for traversing tables
2005-05-04 17:42:28 -03:00
Roberto Ierusalimschy
12acca7bd8
comments
2005-05-04 13:36:23 -03:00
Roberto Ierusalimschy
d5fd44d747
corrected definition of lua_number2int for Windows
2005-05-03 16:30:17 -03:00
Roberto Ierusalimschy
b0abc2ca03
better control of local variables in luaV_execute
2005-05-03 16:01:17 -03:00
Roberto Ierusalimschy
b320d37a80
better tests for correctness of `savedpc'
2005-05-03 16:01:17 -03:00
Roberto Ierusalimschy
9b8d136e1c
`*' operator is primitive only for tables
2005-05-02 14:49:43 -03:00
Roberto Ierusalimschy
9832f6b186
small bug
2005-04-29 10:54:05 -03:00
Roberto Ierusalimschy
8e696dd14a
detail
2005-04-29 10:53:59 -03:00
Roberto Ierusalimschy
c3939f5786
comment
2005-04-29 09:43:47 -03:00
Roberto Ierusalimschy
bcc4089a7d
comment
2005-04-27 15:53:53 -03:00
Roberto Ierusalimschy
cf5d1bdd76
nesting of long strings only in compatibility mode
2005-04-27 15:37:51 -03:00
Roberto Ierusalimschy
8718fda9b2
added LUAI_FUNC to functions not in the API
2005-04-25 16:24:10 -03:00
Roberto Ierusalimschy
8c3c3e7691
small bug for tail-recursive debugging
2005-04-14 10:30:47 -03:00
Roberto Ierusalimschy
04f657c7f8
new protocol to open standard libraries
2005-04-13 14:24:20 -03:00
Roberto Ierusalimschy
2873d4efff
stack could overflow with too many command-line arguments
2005-04-11 15:01:35 -03:00
Roberto Ierusalimschy
a7ea0c71e8
detail
2005-04-11 15:01:29 -03:00
Roberto Ierusalimschy
b1957b1e8e
detail for Windows (untested)
2005-04-07 10:52:45 -03:00
Roberto Ierusalimschy
a17e1fe124
new organization using only one library
2005-04-07 10:52:19 -03:00
Roberto Ierusalimschy
fabf5db237
C stack is the same for the parser and the interpreter, so depth
...
control should be unified in both parts.
2005-04-07 10:09:07 -03:00
Roberto Ierusalimschy
de0bfe33b7
new definition for `lua_number2int' for Windows (not tested yet!)
2005-04-06 14:30:13 -03:00
Roberto Ierusalimschy
9768e2f681
detail
2005-04-05 12:57:59 -03:00
Roberto Ierusalimschy
71eb824036
details
2005-04-05 12:35:15 -03:00
Roberto Ierusalimschy
7b6c3b463e
small optimizations
2005-04-05 10:41:29 -03:00
Roberto Ierusalimschy
0316308c0d
removed dirt optimizations that gave small gains
2005-04-04 15:12:51 -03:00
Roberto Ierusalimschy
409ee99900
detail
2005-04-01 10:51:37 -03:00
Roberto Ierusalimschy
445eda7ead
details
2005-03-30 16:50:29 -03:00
Roberto Ierusalimschy
092dc95b06
using require' to implement -l'
2005-03-29 13:47:48 -03:00
Roberto Ierusalimschy
e6e543a534
better control for compatibility code
2005-03-29 13:20:48 -03:00
Roberto Ierusalimschy
1c9c886974
standard configuration should run out-of-the-box in "any" system
2005-03-29 11:30:16 -03:00
Roberto Ierusalimschy
ade585bdf9
no more LUA_FIRSTINDEX
2005-03-28 14:17:53 -03:00
Roberto Ierusalimschy
04c41444e2
wrong comment corrected
2005-03-28 09:53:40 -03:00
Roberto Ierusalimschy
03fb3c39d4
change #ifdef' for #if defined'
2005-03-23 14:51:11 -03:00
Roberto Ierusalimschy
8af1ca02e0
LUA_USERCONFIG is no longer necessary
2005-03-23 14:50:49 -03:00
Roberto Ierusalimschy
f1eb79fdf4
some line-edit facilities must free the line after its use
2005-03-22 13:55:35 -03:00
Roberto Ierusalimschy
408cb71795
avoid name conflict with some spurious included header files
2005-03-22 13:54:29 -03:00
Roberto Ierusalimschy
390256edf7
better name for GC pause
2005-03-22 13:04:29 -03:00
Roberto Ierusalimschy
ad24cff0f1
lua_gc(STEP) returns whether collection cycle finished
2005-03-21 15:12:21 -03:00
Roberto Ierusalimschy
6d475731ca
cleaner configuration for lua.c
2005-03-21 15:12:07 -03:00
Roberto Ierusalimschy
f41fc0eb0e
small bug: a GC step was not proportional to its "size"
2005-03-18 17:11:28 -03:00
Roberto Ierusalimschy
d872090248
small errors in previous `ci' of luaconf.h.
2005-03-18 15:55:45 -03:00
Roberto Ierusalimschy
fb0f95a2b7
call limit may be larger than shorts
2005-03-18 15:55:09 -03:00
Roberto Ierusalimschy
d3a6d95b9a
more cleaning on configurations
2005-03-18 15:02:04 -03:00
Roberto Ierusalimschy
47984a0cc2
internal definitions have prefix `luai_'
2005-03-18 15:01:37 -03:00
Roberto Ierusalimschy
086d6b09ce
avoid name colision with `close' function
2005-03-18 15:01:14 -03:00
Roberto Ierusalimschy
bfe2905618
avoid too much configuration options
2005-03-18 13:38:43 -03:00
Roberto Ierusalimschy
2cbd9eecfb
try to avoid warnings
2005-03-18 13:38:02 -03:00
Roberto Ierusalimschy
4494094031
detail
2005-03-16 17:02:48 -03:00
Roberto Ierusalimschy
04bbd01171
new operation *t (for size of t) (may yet be removed...)
2005-03-16 13:59:21 -03:00
Roberto Ierusalimschy
9ffae705ee
new "primitive" getn
2005-03-16 13:58:41 -03:00
Roberto Ierusalimschy
6bfef60e77
bug: rawset/rawget do not ignore extra arguments
2005-03-11 12:51:08 -03:00
Roberto Ierusalimschy
370d31a559
luac´ -> luai' (to avoid confusion with other luac stuff)
2005-03-09 13:28:07 -03:00
Roberto Ierusalimschy
f8df21bd20
`luaconf.h´ exports all its definitions always (so all of them
...
must have a lua/LUA prefix).
2005-03-08 17:10:05 -03:00
Roberto Ierusalimschy
d3902cfa81
entries `{[...] = ...}' need space too.
2005-03-08 15:16:45 -03:00
Roberto Ierusalimschy
b5b230d95c
fewer #include's in luaconf.h
2005-03-08 15:09:16 -03:00
Roberto Ierusalimschy
7d57ea70bc
new mod' (%') operator
2005-03-08 15:00:16 -03:00
Roberto Ierusalimschy
2d5b923759
details
2005-03-08 10:37:55 -03:00
Roberto Ierusalimschy
192d185492
C module names may have an optional `l' prefix
2005-03-08 10:27:36 -03:00
Roberto Ierusalimschy
e010ef8948
detail
2005-03-07 15:27:34 -03:00
Roberto Ierusalimschy
1e48b20ce0
loadlib' not global anymore (packaged inside package')
2005-03-07 15:07:34 -03:00
Roberto Ierusalimschy
d1ed6e4c07
small bug: must use original (previous) base
2005-03-07 13:59:01 -03:00
Roberto Ierusalimschy
b6a7983b65
USHRT_MAX may not fit in a (16-bit) int
2005-03-07 13:58:27 -03:00
Roberto Ierusalimschy
49f90ffdeb
new functions (to complete math.h)
2005-03-04 15:57:03 -03:00
Roberto Ierusalimschy
dcabf721f8
"coroutine.current" -> "running" (compatible with "running" status)
2005-02-28 14:24:41 -03:00
Roberto Ierusalimschy
5eeff89f32
comments
2005-02-28 12:59:11 -03:00
Roberto Ierusalimschy
d6143b1d7b
avoid access to undefined global variables
2005-02-28 12:58:48 -03:00
Roberto Ierusalimschy
d55bb795fa
details
2005-02-23 14:30:22 -03:00
Roberto Ierusalimschy
d84cc9d2db
small bug
2005-02-18 10:50:08 -02:00
Roberto Ierusalimschy
7d45a5f48f
C functions and userdata also have environments
2005-02-18 10:40:02 -02:00
Roberto Ierusalimschy
73d7640244
more secure way to stop GC cycles during finalizers
2005-02-14 11:19:50 -02:00
Roberto Ierusalimschy
a9af455b32
detail
2005-02-14 11:19:44 -02:00
Roberto Ierusalimschy
678d2fb2ac
all collected userdata must go to the end of the list of finalizers
2005-02-11 18:03:35 -02:00
Roberto Ierusalimschy
af39352632
LUA_PATH_SEP -> LUA_PATHSEP
2005-02-10 15:12:02 -02:00
Roberto Ierusalimschy
4df8800a01
cleaner way to free all objects
2005-02-10 11:25:02 -02:00
Roberto Ierusalimschy
0e60572606
values holded in open upvalues of suspended threads may be
...
incorrectly collected
2005-01-19 15:03:47 -02:00
Roberto Ierusalimschy
621ef9f767
better control over GC collors of upvalues
2005-01-19 13:54:26 -02:00
Roberto Ierusalimschy
d89a56f869
small warning in C++
2005-01-18 15:23:25 -02:00
Roberto Ierusalimschy
334ba8132b
cleaner way to remark open upvalues
2005-01-18 15:18:09 -02:00
Roberto Ierusalimschy
ac71a0891d
detail
2005-01-17 21:50:55 -02:00
Roberto Ierusalimschy
8e346d875a
auxiliar patch to monitor garbage collection
2005-01-14 12:21:16 -02:00
Roberto Ierusalimschy
5be517602e
no more generational collector (and no more `noinc' mode)
2005-01-14 12:19:42 -02:00
Roberto Ierusalimschy
d2bda8046c
new implementation for loaders
2005-01-14 12:17:18 -02:00
Roberto Ierusalimschy
a72fbf794d
detail
2005-01-10 17:16:29 -02:00
Roberto Ierusalimschy
8ddfe3df29
macros for all arithmetic operations over lua_Numbers
2005-01-10 16:17:39 -02:00
Roberto Ierusalimschy
6eb68ba57a
all function declarations surround name with parentheses
2005-01-10 15:31:50 -02:00
Roberto Ierusalimschy
a27497aa03
debug.traceback' gets an optional initial level' parameter
2005-01-10 15:21:10 -02:00
Roberto Ierusalimschy
0480ea0886
gets `debug.traceback' current when error occurs
2005-01-10 15:21:10 -02:00
Roberto Ierusalimschy
162b66624d
no more `lua_userinit' macro
2005-01-10 14:31:30 -02:00
Roberto Ierusalimschy
e791f025c0
no more `_TRACEBACK' variable
2005-01-10 14:30:59 -02:00
Roberto Ierusalimschy
f61d435a7d
a^b calls `pow´ (from math.h) directly
2005-01-07 18:00:33 -02:00
Roberto Ierusalimschy
071b2ae0e1
details
2005-01-07 17:53:32 -02:00
Roberto Ierusalimschy
e2498e079e
change in hash algorithm so that it does not need empty slot
...
(tables can be 100% full)
2005-01-05 16:20:51 -02:00
Roberto Ierusalimschy
65726f3e2e
cleaner interface to `ltable'
2005-01-04 13:55:12 -02:00
Roberto Ierusalimschy
9fe2d0266a
better configuration for Windows
2005-01-04 10:46:04 -02:00
Roberto Ierusalimschy
e22cdf7752
better error messages when require fails for C module
2004-12-29 16:56:34 -02:00
Roberto Ierusalimschy
a5eb48a3e6
redesigned loadlib (Windows version not tested yet)
2004-12-27 13:58:15 -02:00
Roberto Ierusalimschy
49fe79e9fd
small change
2004-12-27 13:58:15 -02:00
Roberto Ierusalimschy
96727c61b8
several improvements/corrections
2004-12-22 15:43:27 -02:00
Roberto Ierusalimschy
d5ebc3ff6d
small changes
2004-12-22 11:05:33 -02:00
Roberto Ierusalimschy
3d19aee78f
`luac' may generate code without upvalue names
2004-12-20 13:50:00 -02:00
Roberto Ierusalimschy
4194de70e7
details
2004-12-20 11:47:29 -02:00
Roberto Ierusalimschy
c6254dceff
a different option for the GC
2004-12-13 10:15:11 -02:00
Roberto Ierusalimschy
a56d889f72
corrections for `absent' implementation
2004-12-13 10:14:21 -02:00
Roberto Ierusalimschy
2ec4fc4295
simpler code for `print'
2004-12-07 16:31:34 -02:00
Roberto Ierusalimschy
70751dd27c
details
2004-12-07 16:31:16 -02:00
Roberto Ierusalimschy
39a8082f50
more options for controling the GC
2004-12-06 15:53:42 -02:00
Roberto Ierusalimschy
531874f6ce
better (correct?) way to handle `next' over removed keys
2004-12-04 16:10:22 -02:00
Roberto Ierusalimschy
61a888518f
details
2004-12-03 18:54:12 -02:00
Roberto Ierusalimschy
c78940f21a
static names do not need `luaX_' prefix
2004-12-03 18:50:25 -02:00
Roberto Ierusalimschy
8b239eeba1
details
2004-12-03 18:44:19 -02:00
Roberto Ierusalimschy
a5330b77f3
static names do not need `luaX_' prefix
2004-12-03 18:35:33 -02:00
Roberto Ierusalimschy
e1c2fb6eed
details
2004-12-02 10:59:10 -02:00
Roberto Ierusalimschy
12dacd3c0e
added an `L' parameter to macros L_TRY & L_THROW (someone may need it).
2004-12-01 13:52:54 -02:00
Roberto Ierusalimschy
23b38176a7
`LUA_FIRSTINDEX' should not be configurable
2004-12-01 13:50:18 -02:00
Roberto Ierusalimschy
97e2dab1fb
better control of overflows in size computations
2004-12-01 13:46:18 -02:00
Roberto Ierusalimschy
0ed8519127
detail
2004-12-01 13:46:06 -02:00
Roberto Ierusalimschy
0e002005b1
better names for `luaM_free...' macros
2004-11-24 17:20:21 -02:00
Roberto Ierusalimschy
1d99a7360b
details
2004-11-24 17:16:03 -02:00
Roberto Ierusalimschy
2f82bf6fe9
better support for 64-bit machines
2004-11-24 16:55:56 -02:00
Roberto Ierusalimschy
087df82a61
detail
2004-11-24 16:55:42 -02:00
Roberto Ierusalimschy
10e48b9160
details
2004-11-19 14:59:08 -02:00
Roberto Ierusalimschy
6f1ea817f5
better control over memory-size overflows
2004-11-19 13:52:40 -02:00
Roberto Ierusalimschy
cdcb236747
needs to include stdlib.h' to access getenv'
2004-11-19 13:52:12 -02:00
Roberto Ierusalimschy
9be5844713
first full implementation of new package system
2004-11-18 17:53:49 -02:00
Roberto Ierusalimschy
497f042fad
detail
2004-11-17 10:02:41 -02:00
Roberto Ierusalimschy
2ed07ea8c1
towards "requiring" C libraries
2004-11-11 13:42:57 -02:00
Roberto Ierusalimschy
cfd7bc478f
better patch for buffer overflow error
2004-11-03 10:22:39 -02:00
Roberto Ierusalimschy
737ec947d3
better implementation for `floating-point bytes'
2004-11-01 12:06:50 -03:00
Roberto Ierusalimschy
45d566f676
small corrections (thanks to Mike Pall)
2004-11-01 11:33:33 -03:00
Roberto Ierusalimschy
cfb79b1751
more secure way to compute final string length
2004-10-28 14:45:51 -03:00
Roberto Ierusalimschy
3e1a1f2836
better configuration for loadlib + tested Mac OS X version
2004-10-18 15:07:31 -03:00
Roberto Ierusalimschy
b32e9a46d2
better configuration for loadlib
2004-10-18 15:07:31 -03:00
Roberto Ierusalimschy
e5cfa7a367
use of parentheses around macro parameters in call lists, to avoid
...
problems with comma expressions
2004-10-18 09:51:44 -03:00
Roberto Ierusalimschy
aae1612747
avoid name chash in `all.c'
2004-10-08 15:57:16 -03:00
Roberto Ierusalimschy
8050e75f9d
bug: gc metamethod must disable GC steps (to avoid nested calls)
2004-10-08 13:00:34 -03:00
Roberto Ierusalimschy
3bec76abe3
first version of loadlib for Mac OS X (not tested yet!!)
2004-10-07 14:27:20 -03:00
Roberto Ierusalimschy
5cb6037d49
cannot jump to a setlist count
2004-10-07 14:27:00 -03:00
Roberto Ierusalimschy
f1c2dd3aed
detail
2004-10-06 15:34:47 -03:00
Roberto Ierusalimschy
bd38017ddf
small optimization for table size in machines with double allignment
2004-10-06 15:34:16 -03:00
Roberto Ierusalimschy
652f885c30
detail
2004-10-04 16:07:42 -03:00
Roberto Ierusalimschy
f7e9465a0c
new format for SETLIST opcode
2004-10-04 16:04:34 -03:00
Roberto Ierusalimschy
5ee87acd6b
small optimization for boolean constants + new format for SETLIST opcode
2004-10-04 16:01:53 -03:00
Roberto Ierusalimschy
5d834bdf57
function constants may include boolean values
2004-10-04 16:01:12 -03:00
Roberto Ierusalimschy
67391a35da
details
2004-09-29 18:03:42 -03:00
Roberto Ierusalimschy
36541dec9b
towards new package system
2004-09-29 18:03:14 -03:00
Roberto Ierusalimschy
cf2a194edc
better API for luaL_getfield/setfield
2004-09-29 18:00:25 -03:00
Roberto Ierusalimschy
66845f415f
small optimizations
2004-09-27 15:54:45 -03:00
Roberto Ierusalimschy
b2820f39a2
long string delimiter changed from [*[' to [=['
2004-09-22 11:02:00 -03:00
Roberto Ierusalimschy
8b5bb6056b
removal of unused variable
2004-09-22 09:37:52 -03:00
Roberto Ierusalimschy
4973682294
small bug with coroutine tracebacks
2004-09-21 14:58:06 -03:00
Roberto Ierusalimschy
6acfb91c8d
new auxiliary functions to implement new package system
2004-09-21 13:54:32 -03:00
Roberto Ierusalimschy
2419f2bf02
cleaner API for coroutines
2004-09-15 17:39:42 -03:00
Roberto Ierusalimschy
0e54d2be36
bug: barrier was wrong for generational phase
2004-09-15 17:38:15 -03:00
Roberto Ierusalimschy
226c57fec0
simpler configuration to turn on all asserts
2004-09-10 14:30:46 -03:00
Roberto Ierusalimschy
0de2065f4e
tighter tests for stack overflow
2004-09-08 11:23:09 -03:00
Roberto Ierusalimschy
ee165043ef
two bugs related to varargs
2004-09-03 12:48:56 -03:00
Roberto Ierusalimschy
3c394b12f9
detail
2004-09-03 10:17:14 -03:00
Roberto Ierusalimschy
79fc7dea43
simpler implementation for generic reader
2004-09-03 10:16:48 -03:00
Roberto Ierusalimschy
9c34e23214
new libs loslib´ and linit´
2004-09-01 10:49:20 -03:00
Roberto Ierusalimschy
2aba14b623
details
2004-09-01 10:47:31 -03:00
Roberto Ierusalimschy
1dd8c9b6b6
detail
2004-08-31 14:57:33 -03:00
Roberto Ierusalimschy
7d309480dd
new way to handle _PATH (old LUA_PATH)
2004-08-30 15:35:14 -03:00
Roberto Ierusalimschy
bcb2cb59ac
select' returns all values after given n'
2004-08-30 12:28:32 -03:00
Roberto Ierusalimschy
0b06241483
better control for GC cycles
2004-08-30 10:44:44 -03:00
Roberto Ierusalimschy
857253cdfc
detail
2004-08-30 10:44:04 -03:00
Roberto Ierusalimschy
5dcd908add
detail
2004-08-26 11:19:55 -03:00
Roberto Ierusalimschy
32d4f304db
first implementation of generational GC
2004-08-24 17:12:06 -03:00
Roberto Ierusalimschy
4b12eff801
small correction (less conservative write barrier for tables)
2004-08-24 17:09:11 -03:00
Roberto Ierusalimschy
271e05917f
bug: lua_getupvalue and setupvalue do not check for index too small.
2004-08-17 14:45:45 -03:00
Roberto Ierusalimschy
fe8c365281
default state (created by `luaL_newstate´) has a default panic function
2004-08-13 16:52:53 -03:00
Roberto Ierusalimschy
2d8b099274
better checking for read errors (with `ferror´)
2004-08-13 16:52:13 -03:00
Roberto Ierusalimschy
ff4f8fe59a
small bug: calls to upvalues were not correctly traced
2004-08-13 15:02:36 -03:00
Roberto Ierusalimschy
a7c74c06b9
small bug: lua_gc(count) was falling through to next option
2004-08-12 14:02:51 -03:00
Roberto Ierusalimschy
c7dda42c2f
bug (due to new handling of varargs)
2004-08-12 11:19:51 -03:00
Roberto Ierusalimschy
26ae992129
less conservative write barrier for tables
2004-08-10 16:17:23 -03:00
Roberto Ierusalimschy
f87057690b
`io.lines' also can give the file name in its error message
2004-08-09 11:35:59 -03:00
Roberto Ierusalimschy
9e6aa878c9
string.byte truncates indices out of range
2004-08-09 10:30:33 -03:00
Roberto Ierusalimschy
c0fdaf5842
string.byte may return multiple values
2004-08-06 14:35:38 -03:00
Roberto Ierusalimschy
2430d3cb28
small changes (due to Rici Lake) to allow testing non-supported OS functions
2004-08-05 16:30:37 -03:00
Roberto Ierusalimschy
6bddbbde7a
details (opcode may not be the first field)
2004-08-04 17:18:13 -03:00
Roberto Ierusalimschy
31e48f26ed
small bug
2004-07-16 10:30:53 -03:00
Roberto Ierusalimschy
0d9007b642
no more LUA_OPNAMES
2004-07-16 10:17:00 -03:00
Roberto Ierusalimschy
9609236fbb
no more LUA_OPNAMES; it is simpler to "waste" 400 bytes
2004-07-16 10:15:32 -03:00
Roberto Ierusalimschy
942496d767
small bug
2004-07-13 17:11:32 -03:00
Roberto Ierusalimschy
a535ad6fee
several small changes (mainly function names)
2004-07-13 16:56:44 -03:00
Roberto Ierusalimschy
4206d7ed60
`lua_Chunkwriter' returns 0 in case of success
2004-07-09 15:24:41 -03:00
Roberto Ierusalimschy
7a796a0682
new macro `luaL_typename'
2004-07-09 15:23:17 -03:00
Roberto Ierusalimschy
76d8b8db06
lua_pushfstring' now supports %p' option too
2004-07-09 13:01:38 -03:00
Roberto Ierusalimschy
ce455481ab
separation between io lib and os lib
2004-07-09 12:47:48 -03:00
Roberto Ierusalimschy
85f1d70e68
OS lib (finally separated from io lib)
2004-07-09 12:47:48 -03:00
Roberto Ierusalimschy
31f6540fba
back with an "open all libs" function
2004-07-09 11:29:29 -03:00
Roberto Ierusalimschy
eab1965c05
bug: `lua_setfenv' needs a write barrier
2004-07-09 11:20:22 -03:00
Roberto Ierusalimschy
3d5187f6e5
require' uses its private reference to _LOADED' table
2004-07-02 15:09:11 -03:00
Roberto Ierusalimschy
80ec81926c
`lua.c' also needs the default path, so auxlib should provide it
2004-07-01 11:26:28 -03:00
Roberto Ierusalimschy
96917ff42a
"step" option in lua_gc also need to lock Lua.
2004-06-30 11:15:23 -03:00
Roberto Ierusalimschy
a6179adf12
detail
2004-06-30 09:58:44 -03:00
Roberto Ierusalimschy
02a2c01ccd
new way to code RK values
2004-06-29 15:49:02 -03:00
Roberto Ierusalimschy
23e08a68f5
detail
2004-06-29 14:05:00 -03:00
Roberto Ierusalimschy
0f5a497ed9
new interface for search-path function + small changes in require
2004-06-29 13:58:17 -03:00
Roberto Ierusalimschy
753625c3f3
new interface for search-path function
2004-06-29 13:57:56 -03:00
Roberto Ierusalimschy
42b74ccf1d
libraries may want to use `lua_assert' too...
2004-06-23 12:57:29 -03:00
Roberto Ierusalimschy
0c49857c1a
new scheme to search paths
2004-06-21 17:05:29 -03:00
Roberto Ierusalimschy
6b41e84da5
`assert' returns all its parameters (not only the first)
2004-06-21 13:45:09 -03:00
Roberto Ierusalimschy
359840c2f8
new coroutines inherit hook from creator
2004-06-17 11:25:31 -03:00
Roberto Ierusalimschy
dba17070ac
optional error for accesss to undefined variables/fields
2004-06-17 11:06:52 -03:00
Roberto Ierusalimschy
569eefbf73
detail
2004-06-16 17:22:43 -03:00
Roberto Ierusalimschy
5e4ea9a831
`setn' returns its "self" (the table)
2004-06-15 10:37:21 -03:00
Roberto Ierusalimschy
6311e3109f
`setfenv' returns "self"
2004-06-15 10:31:30 -03:00
Roberto Ierusalimschy
9b854e6dbc
BUG: string concatenation may cause arithmetic overflow, leading
...
to a buffer overflow.
2004-06-08 13:23:58 -03:00
Roberto Ierusalimschy
2b2d8ecd7a
details
2004-06-08 11:31:15 -03:00
Roberto Ierusalimschy
75057dfced
2004-06-08 11:31:00 -03:00
Roberto Ierusalimschy
345379b5ff
option for garbage-collector `step'
2004-06-04 12:30:53 -03:00
Roberto Ierusalimschy
118e471fa0
details
2004-06-02 16:09:36 -03:00
Roberto Ierusalimschy
ba9878fcb8
lock stuff defined in `luaconf.h'
2004-06-02 16:09:21 -03:00
Roberto Ierusalimschy
fa38421cea
`testC' can operate on other states
2004-06-02 16:08:52 -03:00
Roberto Ierusalimschy
e8d4fe7236
new macro lua_threadyield' + lock stuff in luaconf.h' + details
2004-06-02 16:07:55 -03:00
Roberto Ierusalimschy
b8691f13a8
`getn' uses binary search if it has to count elements
2004-06-02 16:06:14 -03:00
Roberto Ierusalimschy
f4718544de
what is provided by lauxlib.c should be defined at lauxlib.h
2004-06-02 14:37:03 -03:00
Roberto Ierusalimschy
50f9cd201e
no more `__fenv'
2004-06-02 11:20:08 -03:00
Roberto Ierusalimschy
9d8426bab4
better error messages for `loadfile'
2004-06-02 10:50:46 -03:00
Roberto Ierusalimschy
557f0009c4
clear definition for `lua_number2int'
2004-06-02 10:24:43 -03:00
Roberto Ierusalimschy
0dfd04eb60
lua_strlen' upgraded to lua_objsize' (which also works with userdata)
2004-05-31 16:41:52 -03:00
Roberto Ierusalimschy
1e0aaf2156
luaL_dofile' and luaL_dostring' are deprecated
2004-05-31 16:27:14 -03:00
Roberto Ierusalimschy
616438fe9a
new way to use vararg' parameters (with ...')
2004-05-31 15:51:50 -03:00
Roberto Ierusalimschy
47eda6ebd8
main must return status from original main!
2004-05-31 15:50:48 -03:00
Roberto Ierusalimschy
0f49b3e62d
new function `select'
2004-05-31 15:50:30 -03:00
Roberto Ierusalimschy
0733c83b8c
other modules may need FILEHANDLE definition
2004-05-28 15:35:05 -03:00
Roberto Ierusalimschy
e9844a4f1d
`popen' is not ANSI and therefore was removed from the basic library
2004-05-28 15:32:51 -03:00
Roberto Ierusalimschy
c61bb89dba
details
2004-05-17 09:34:00 -03:00
Roberto Ierusalimschy
0bda88e6cd
small steps towards yields in iterators and tag methods
2004-05-14 16:25:09 -03:00
Roberto Ierusalimschy
7966a4acae
avoid name clashes among different files
2004-05-11 13:52:08 -03:00
Roberto Ierusalimschy
37cd986532
in time', uses default if isdst' is absent
2004-05-10 17:26:37 -03:00
Roberto Ierusalimschy
a17dd24b34
no more USE_DEGREES option
2004-05-10 15:11:32 -03:00
Roberto Ierusalimschy
b072e4ea0b
tinsert' and tremove' also use LUA_FIRSTINDEX
2004-05-10 15:06:14 -03:00
Roberto Ierusalimschy
7e41612eb2
code parameterized by LUA_FIRSTINDEX (first index of an array)
2004-05-10 14:50:51 -03:00
Roberto Ierusalimschy
b0f341ee52
LUAL_BUFFERSIZE is used in `lauxlib.h' and so everybody may need it
2004-05-10 10:58:26 -03:00
Roberto Ierusalimschy
1c459b881f
accept `\r' as newline when looking for line end
2004-05-03 09:30:41 -03:00
Roberto Ierusalimschy
9629508a98
configuration file for Lua project
2004-05-03 09:28:43 -03:00
Roberto Ierusalimschy
763b8fba1b
more stuff goes to configuration file
2004-05-03 09:28:43 -03:00
Roberto Ierusalimschy
b4cd38ba6c
new scheme for configuration through `luaconf.h'
2004-04-30 17:13:38 -03:00
Roberto Ierusalimschy
079facab40
ensures own top is corrected after calling function with multiple results
2004-04-05 11:43:17 -03:00
Roberto Ierusalimschy
4c5d7b2ddd
small optimization for {f()}
2004-03-26 11:02:41 -03:00
Roberto Ierusalimschy
d7cb622866
`unpack' has two optional arguments (to give a range)
2004-03-26 10:25:17 -03:00
Roberto Ierusalimschy
26a9b249db
details
2004-03-24 12:46:49 -03:00
Roberto Ierusalimschy
227bddafe8
new copyright year
2004-03-24 10:55:46 -03:00
Roberto Ierusalimschy
5008e3d7d1
new states must use controlled malloc, too
2004-03-23 14:07:53 -03:00
Roberto Ierusalimschy
21bc05c920
write barrier for C upvalues
2004-03-23 14:07:34 -03:00
Roberto Ierusalimschy
29a13b4128
detail
2004-03-23 13:38:43 -03:00
Roberto Ierusalimschy
ef8c0d7d90
better message for errors with upvalues
2004-03-23 10:10:16 -03:00
Roberto Ierusalimschy
178246062c
reuse `sweeplist' for all lists
2004-03-23 09:57:12 -03:00
Roberto Ierusalimschy
24f2d1183c
detail
2004-03-16 09:31:40 -03:00
Roberto Ierusalimschy
8e1f25e3f8
bug in `dofile'
2004-03-15 18:09:55 -03:00
Roberto Ierusalimschy
48a8d78102
new tests to check memory consistency (for incremental GC)
2004-03-15 18:04:54 -03:00
Roberto Ierusalimschy
a4e1230f95
better way to control open upvalues
2004-03-15 18:04:33 -03:00
Roberto Ierusalimschy
9804467eeb
detail
2004-03-13 10:32:09 -03:00
Roberto Ierusalimschy
a003e89125
better error messages for some limits
2004-03-12 16:53:56 -03:00
Roberto Ierusalimschy
b876ec61c0
new (temporary?) API for garbage collector
2004-03-09 14:34:35 -03:00
Roberto Ierusalimschy
898e8a6794
added include to stdarg.h (as it uses vararg facilities)
2004-02-20 13:01:05 -03:00
Roberto Ierusalimschy
1edea34666
details
2004-02-18 10:40:03 -03:00
Roberto Ierusalimschy
2aaf7394ad
more and better tools (assertions & inspectors) to check incremental GC
2004-02-16 16:09:52 -03:00
Roberto Ierusalimschy
b3ce450529
avoid calling `memcmp' with a NULL argument
2004-01-15 10:40:26 -02:00
Roberto Ierusalimschy
24434b59f7
'%' must be '%%' to avoid formatting problems
2004-01-02 09:54:14 -02:00
Roberto Ierusalimschy
beb2aa5a46
atomic operations are not GC "states"
2003-12-12 16:29:34 -02:00
Roberto Ierusalimschy
47fc57a252
TObject' renamed to TValue' + other name changes and better assertions
...
for incremental garbage collection
2003-12-10 10:13:36 -02:00
Roberto Ierusalimschy
4d5fe1f54b
detail
2003-12-10 09:04:54 -02:00
Roberto Ierusalimschy
df429f163a
First version of incremental GC
2003-12-09 14:56:11 -02:00
Roberto Ierusalimschy
fe595a45c2
`grayagain' list
2003-12-04 16:52:23 -02:00
Roberto Ierusalimschy
9db1942bac
sweep of strings also incremental
2003-12-04 15:22:42 -02:00
Roberto Ierusalimschy
c6eac44a94
two different white flags (to distinguish dead elements from new ones)
2003-12-03 18:03:07 -02:00
Roberto Ierusalimschy
8878554b85
single list for all collectible objects, with udata separated at the
...
end of the list
2003-12-03 10:30:41 -02:00
Roberto Ierusalimschy
af850484a9
default metatable can be NULL
2003-12-01 16:22:56 -02:00
Roberto Ierusalimschy
1d10acb355
incremental GC phases
2003-12-01 14:33:30 -02:00
Roberto Ierusalimschy
da61624756
avoid overflow when doubling size
2003-11-27 16:18:37 -02:00
Roberto Ierusalimschy
8b97b072cd
details
2003-11-27 16:05:14 -02:00
Roberto Ierusalimschy
5ee63257f9
macros for closure sizes are global
2003-11-24 16:50:36 -02:00
Roberto Ierusalimschy
8bc6c68021
details
2003-11-19 17:59:18 -02:00
Roberto Ierusalimschy
57b6ed6815
initial implementation of white/gray/black coloring
2003-11-19 17:41:57 -02:00
Roberto Ierusalimschy
9b9cdfee8b
gclist for upvalues must be available even when upvalue is still open
2003-11-19 17:41:30 -02:00
Roberto Ierusalimschy
366e4af3c9
towards incremental GC
2003-11-18 12:55:11 -02:00
Roberto Ierusalimschy
53c7f86194
details
2003-11-18 08:44:53 -02:00
Roberto Ierusalimschy
ab7d9bfd0c
cleaner code for manipulation of `marked' field
2003-11-17 17:50:05 -02:00
Roberto Ierusalimschy
921b1723e2
comments
2003-11-11 14:34:17 -02:00
Roberto Ierusalimschy
fa198197a0
lua_(set)getglobal are ok to use
2003-11-05 09:59:14 -02:00
Roberto Ierusalimschy
1e944de6cb
towards a "stackless" call of metamethods (?)
2003-10-27 17:14:31 -02:00
Roberto Ierusalimschy
275c150b17
error()' (and error(nil)') generates errors with no error messages
2003-10-23 16:06:22 -02:00
Roberto Ierusalimschy
d6d896b953
lua_set(get)global may use lua_set(get)field
2003-10-21 08:58:58 -02:00
Roberto Ierusalimschy
07201066bd
core does not look for function name in globals (too particular)
2003-10-20 16:42:28 -02:00
Roberto Ierusalimschy
97b838d9ab
new semantics for setn/getn (no more changes to `n')
2003-10-20 16:32:55 -02:00
Roberto Ierusalimschy
c51bcf4796
it's ok to dump functions with upvalues
2003-10-20 15:42:41 -02:00
Roberto Ierusalimschy
03bab90303
new function `lua_getallocf' to retrieve allocation function and data
2003-10-20 10:25:23 -02:00
Roberto Ierusalimschy
8502331f69
`luaX_errorline' was used only in one place
2003-10-20 10:24:34 -02:00
Roberto Ierusalimschy
9914e1bcdd
detail
2003-10-20 10:24:26 -02:00
Roberto Ierusalimschy
10de467c79
new function `lua_createtable'
2003-10-10 10:29:28 -03:00
Roberto Ierusalimschy
533737f26e
new functions lua_getfield' and lua_setfield'
2003-10-10 09:57:55 -03:00
Roberto Ierusalimschy
a41d60e1d1
debugger can only see `local function' after it has a meaningful value
2003-10-09 14:56:23 -03:00
Roberto Ierusalimschy
f04fe526cd
new functions `lua_tointeger' and lua_pushinteger'
2003-10-07 17:13:41 -03:00
Roberto Ierusalimschy
21947deddc
new bug + correction in path for coroutine bug
2003-10-07 09:34:21 -03:00
Roberto Ierusalimschy
3087636c76
detail
2003-10-03 13:07:44 -03:00
Roberto Ierusalimschy
7b8504840f
buffer should better use `size_t' for its size
2003-10-03 13:05:34 -03:00
Roberto Ierusalimschy
3a508b8bd7
avoid the use of `strlen' (strings are literals)
2003-10-03 13:04:24 -03:00
Roberto Ierusalimschy
6becdb3e70
details
2003-10-03 13:04:11 -03:00
Roberto Ierusalimschy
b97fb932ec
Lua kernel does not use malloc/free functions.
2003-10-02 17:31:17 -03:00
Roberto Ierusalimschy
c7cf92e6f3
avoid unecessary includes of `stdlib'
2003-10-02 16:21:09 -03:00
Roberto Ierusalimschy
a62d39aa1c
detail: `luaL_where' does not use the name information
2003-10-01 13:50:53 -03:00
Roberto Ierusalimschy
5d4bf35ec9
bug: syntax `local function' does not increment stack size
2003-09-29 13:41:35 -03:00
Roberto Ierusalimschy
6063c5c61f
bug: cannot invalidate a running coroutine
2003-09-05 11:30:59 -03:00
Roberto Ierusalimschy
2a70107581
detail
2003-09-05 11:00:27 -03:00
Roberto Ierusalimschy
7dae7899b1
main thread and global state are allocated in a single block
2003-09-04 17:19:07 -03:00
Roberto Ierusalimschy
30e51f09b9
some changes in error reporting
2003-09-04 17:00:28 -03:00
Roberto Ierusalimschy
994a37c8e8
IBM AS400 (OS400) has sizeof(void *)==16, and a `%p' may generate
...
up to 60 characters in a `printf'. That causes a buffer overflow in
`tostring'..
2003-08-29 13:50:02 -03:00
Roberto Ierusalimschy
0ff1596476
new form of long strings: `[***[...]***]'
2003-08-29 13:48:14 -03:00
Roberto Ierusalimschy
b27664e0db
simpler manipulation of buffer count in scanner
2003-08-28 11:38:46 -03:00
Roberto Ierusalimschy
beb896b082
new function (generic) `load'
2003-08-27 18:02:08 -03:00
Roberto Ierusalimschy
8332d5c8a5
parser fully reentrant(!)
2003-08-27 18:01:44 -03:00
Roberto Ierusalimschy
885961be1d
reader runs outside core Lua
2003-08-27 17:57:52 -03:00
Roberto Ierusalimschy
b114142799
new auxiliary function `luaH_setstr'
2003-08-26 09:04:13 -03:00
Roberto Ierusalimschy
4b2e71ddb6
ZIO passes Lua state to chunk reader
2003-08-25 17:00:50 -03:00
Roberto Ierusalimschy
9fcc485176
zio does not keep "source" name (nobody uses it)
2003-08-25 16:51:54 -03:00
Roberto Ierusalimschy
64066359dd
bug: IBM AS400 (OS400) has sizeof(void *)==16, and a `%p' may generate
...
up to 60 characters in a `printf'. That causes a buffer overflow in
`tostring'..
2003-08-25 16:49:47 -03:00
Roberto Ierusalimschy
97af24ea32
newlines can be \n', \r', \r\n', or \n\r'
2003-08-21 11:16:43 -03:00
Roberto Ierusalimschy
433cb1d13a
no more checks for non-default compilation options + luaU_dump has
...
new option to strip debug info
2003-08-15 10:48:53 -03:00
Roberto Ierusalimschy
d66198719d
several bugs for Lua 5.0 + new format for bug entries
2003-07-29 16:27:46 -03:00
Roberto Ierusalimschy
91bf77534c
no need for a maximum number of parameters (maximum number of locals
...
take care of that).
2003-07-29 16:26:34 -03:00
Roberto Ierusalimschy
a0a384a6b1
bug: userdata to be collected still counts into new GC threshold,
...
increasing memory consumption
2003-07-29 16:25:37 -03:00
Roberto Ierusalimschy
e89945aaa1
syntax ...=var' changed to var=...'
2003-07-29 15:51:00 -03:00
Roberto Ierusalimschy
d407d3fe0e
details
2003-07-28 15:31:20 -03:00
Roberto Ierusalimschy
522407e23a
we do not need a default panic (that does nothing anyway...)
2003-07-16 17:51:47 -03:00
Roberto Ierusalimschy
fa26d294ae
new way to control `pc' of running functions
2003-07-16 17:49:02 -03:00
Roberto Ierusalimschy
5a761e3a15
opcode number may be invalid
2003-07-10 08:59:06 -03:00
Roberto Ierusalimschy
265530478b
more changes to reduce stack usage by the parser
2003-07-09 17:11:30 -03:00
Roberto Ierusalimschy
00180bb133
small changes to reduce stack usage by the parser
2003-07-09 12:36:38 -03:00
Roberto Ierusalimschy
66ed154c89
details
2003-07-09 09:08:43 -03:00
Roberto Ierusalimschy
f52f357a55
correct handling when a thread turns on line hooks in another thread
2003-07-07 10:37:56 -03:00
Roberto Ierusalimschy
79fee99024
`debug' library can operate over other threads
2003-07-07 10:37:08 -03:00
Roberto Ierusalimschy
a73ded2153
Move nothing when there is nothing to move
2003-07-07 10:34:25 -03:00
Roberto Ierusalimschy
0ec4c473df
bug: file:close cannot be called without a file.
2003-07-07 10:32:52 -03:00
Roberto Ierusalimschy
9e05503ffa
bug: C functions also may have stacks larger than current top
2003-07-07 10:32:19 -03:00
Roberto Ierusalimschy
17f695157c
define a `lua_isthread' for completeness
2003-07-07 10:30:57 -03:00
Roberto Ierusalimschy
b93f67f2ce
detail
2003-06-10 09:36:26 -03:00
Roberto Ierusalimschy
60aa01d8f7
fully-weak tables are more efficient
2003-05-16 15:59:08 -03:00
Roberto Ierusalimschy
ecf5730c0c
(much) smarter way to clear weak tables
2003-05-16 15:58:39 -03:00
Roberto Ierusalimschy
b10bfd4934
comments
2003-05-15 16:46:03 -03:00
Roberto Ierusalimschy
176cd7d1a3
`#!' is detected by loadfile, not by the lexer
2003-05-15 09:20:24 -03:00
Roberto Ierusalimschy
859c7f7ce0
LUA_SIGNATURE is public
2003-05-15 09:20:04 -03:00
Roberto Ierusalimschy
56c5e749cc
no more compatibility code (`lua_pushupvalues')
2003-05-14 18:10:07 -03:00
Roberto Ierusalimschy
9ec9a012e7
details
2003-05-14 18:09:53 -03:00
Roberto Ierusalimschy
dae99205cf
no more compatibility code
2003-05-14 18:06:56 -03:00
Roberto Ierusalimschy
9eb0f25a29
no more compatibility code for 4.0
2003-05-14 18:02:39 -03:00
Roberto Ierusalimschy
f93051155c
ok to use #elif' and #if defined()'
2003-05-14 18:01:53 -03:00
Roberto Ierusalimschy
524ae9fc3d
new function `setvbuf'
2003-05-14 16:03:43 -03:00
Roberto Ierusalimschy
0ddedaee92
new function `string.reverse'
2003-05-14 11:35:54 -03:00
Roberto Ierusalimschy
5cc448386a
new syntax: `... [= name]'
2003-05-14 09:32:46 -03:00
Roberto Ierusalimschy
c116dcb92b
better information about instruction behavior (use of arguments)
2003-05-14 09:09:12 -03:00
Roberto Ierusalimschy
6d268b0b00
new semantics for "for" local variables
2003-05-13 17:15:59 -03:00
Roberto Ierusalimschy
c767747191
new (internal) macros for error handling
2003-05-13 16:22:19 -03:00
Roberto Ierusalimschy
f966404ed6
simpler implementation for valid/acceptable indices
2003-05-09 17:16:54 -03:00
Roberto Ierusalimschy
ee07ad346d
`getn' doesn't need this field (values cannot be nil)
2003-05-07 13:02:16 -03:00
Roberto Ierusalimschy
fee9e473f2
inlining of `luaV_gettable' were too complex (dirty)
2003-05-05 15:39:57 -03:00
Roberto Ierusalimschy
82dfacbcf7
detail
2003-04-30 17:24:38 -03:00
Roberto Ierusalimschy
26097b6c4b
uses integers as keys to standard i/o files
2003-04-30 17:15:55 -03:00
Roberto Ierusalimschy
f1f8f0ca22
simpler way to check maximum gc threshold
2003-04-28 16:58:06 -03:00
Roberto Ierusalimschy
bcc5f1406b
test function for lua_setgcthreshold
2003-04-28 16:58:06 -03:00
Roberto Ierusalimschy
b1b752fb2b
comments
2003-04-28 16:57:50 -03:00
Roberto Ierusalimschy
572a69df78
Lua does not need all those different types...
2003-04-28 16:26:16 -03:00
Roberto Ierusalimschy
943c82b376
avoid unnecessary call to log2 on too large indices
2003-04-28 10:31:46 -03:00
Roberto Ierusalimschy
17149b7d43
avoid warnings (Instruction' may not fit into an int')
2003-04-28 10:31:06 -03:00
Roberto Ierusalimschy
01b303c87e
simpler log2 implementation
2003-04-28 10:30:14 -03:00
Roberto Ierusalimschy
762c737037
last changes by lhf
2003-04-10 14:39:41 -03:00
Roberto Ierusalimschy
de57dc2653
new scheme to control `loadlib' configuration (default for dlopen
...
implementation is not to include it)
2003-04-07 17:11:53 -03:00
Roberto Ierusalimschy
d1df829f8d
lua_getmetatable must accept any acceptable index
2003-04-07 11:36:08 -03:00
Roberto Ierusalimschy
2ad947fe03
new test options for luaL_getn/setn
2003-04-07 11:35:00 -03:00
Roberto Ierusalimschy
f0cc013afa
luaL_getn/setn must operate correctly over negative indices
2003-04-07 11:35:00 -03:00
Roberto Ierusalimschy
0d88545b82
warnings from several compilers (mainly typecasts when lua_Number is float)
2003-04-03 10:35:34 -03:00
Roberto Ierusalimschy
f84c5a5fc6
avoid conflicts in (re)definition of `isatty'
2003-04-03 10:34:42 -03:00
Roberto Ierusalimschy
05d35d8f3c
comments
2003-04-02 10:09:14 -03:00
Roberto Ierusalimschy
3a6230ef7c
error-message format
2003-04-01 14:52:31 -03:00
Roberto Ierusalimschy
a424a112b5
clearance of debuging code (left by mistake)
2003-03-31 10:00:25 -03:00
Roberto Ierusalimschy
b858161fbc
new hash method for lua_Number (double) (due to a performance problem)
2003-03-24 11:18:42 -03:00
Roberto Ierusalimschy
80bac182db
do not mix --help' with --'
2003-03-24 09:40:01 -03:00
Roberto Ierusalimschy
30a411ab3c
chars from zio are always unsigned
2003-03-24 09:39:34 -03:00
Roberto Ierusalimschy
5bb5a1831d
details
2003-03-20 17:26:33 -03:00
Roberto Ierusalimschy
b518d14071
bug: zio mixes a 255 as first char in a buffer with EOZ
2003-03-20 13:00:56 -03:00
Roberto Ierusalimschy
15dbb53461
towards 5.0 final
2003-03-19 18:27:30 -03:00
Roberto Ierusalimschy
abc304f9da
avoid name colision (for alllua.c)
2003-03-19 18:24:04 -03:00
Roberto Ierusalimschy
1a553f9199
better error messages
2003-03-19 18:16:12 -03:00
Roberto Ierusalimschy
0ca225d33a
better error message
2003-03-19 18:15:18 -03:00
Roberto Ierusalimschy
70e2b7ab86
name changes to avoid name collision between macros and variables
2003-03-19 18:14:53 -03:00
Roberto Ierusalimschy
5a144e891a
__globals' -> __fenv'
2003-03-19 18:14:34 -03:00
Roberto Ierusalimschy
b12776f29c
`luaL_getmetafield' was leaving extra value on the stack
2003-03-18 15:48:31 -03:00
Roberto Ierusalimschy
ab9e062928
name changes to avoid name collision between macros and variables
2003-03-18 09:50:04 -03:00
Roberto Ierusalimschy
81cdbabf09
detail (change place of a prototype)
2003-03-18 09:31:39 -03:00
Roberto Ierusalimschy
40cfb0691e
new auxiliary functions for `type' manipulation
2003-03-18 09:25:32 -03:00
Roberto Ierusalimschy
9b7af7e45b
tests for Windows version
2003-03-18 09:25:01 -03:00
Roberto Ierusalimschy
2e66248f8a
unused argument
2003-03-18 09:24:38 -03:00
Roberto Ierusalimschy
79db75101e
detail
2003-03-18 09:24:26 -03:00
Roberto Ierusalimschy
b0c40e2405
first version of `loadlib'
2003-03-17 10:04:58 -03:00
Roberto Ierusalimschy
4734e2de05
`loadlib' now an official library
2003-03-17 10:01:48 -03:00
Roberto Ierusalimschy
7ea180af6e
detail
2003-03-14 16:08:11 -03:00
Roberto Ierusalimschy
05d567d52e
io.input'/io.output' always return current file
2003-03-14 16:00:16 -03:00
Roberto Ierusalimschy
d8a3a00d84
`string.find' also accepts out-of-range indices
2003-03-14 15:59:53 -03:00
Roberto Ierusalimschy
c9ea94ec92
out-of-bound upvalues (in C) are acceptable indices
2003-03-14 15:59:21 -03:00
Roberto Ierusalimschy
fa4b4c1100
loadstring/loadfile use global environment + setfenv(0) changes
...
global environment
2003-03-11 15:17:43 -03:00
Roberto Ierusalimschy
4039bf457d
^ operator is defined by global `__pow'
2003-03-11 09:30:37 -03:00
Roberto Ierusalimschy
034de1fe73
new names for functions that open C libraries
2003-03-11 09:24:34 -03:00
Roberto Ierusalimschy
430d6db928
LUA_PATH components may have multiple interrogation marks
2003-03-11 09:08:13 -03:00
Roberto Ierusalimschy
7c3857cded
comments
2003-03-07 10:21:31 -03:00
Roberto Ierusalimschy
8ce6f0b418
avoid including system headers after program headers
2003-03-06 16:37:42 -03:00
Roberto Ierusalimschy
572bddc0b0
LUA_USETMPNAME -> USE_TMPNAME
2003-03-06 16:36:44 -03:00
Roberto Ierusalimschy
3684f67771
details (text of an error message)
2003-03-06 16:36:16 -03:00
Roberto Ierusalimschy
69dd9461e5
bug: GC metamethod calls could mess C/Lua stack syncronization
2003-02-28 16:45:15 -03:00
Roberto Ierusalimschy
6b6bc532a4
better error message for (deprecated) "%global"
2003-02-28 14:19:47 -03:00
Roberto Ierusalimschy
ea16ee41a8
no more attempt to optimize GC when parsing new modules (too complex)
2003-02-28 12:42:08 -03:00
Roberto Ierusalimschy
60d11ec316
by default, gcc does not get tmpname
2003-02-27 09:39:05 -03:00
Roberto Ierusalimschy
e1a424e8a3
avoid the identifier index' (clashes with BSD index' function)
2003-02-27 09:33:07 -03:00
Roberto Ierusalimschy
59ce42dbd5
detail
2003-02-27 09:32:30 -03:00
Roberto Ierusalimschy
92f6e0c1bf
no-nonsense debug information about tail calls
2003-02-27 08:52:30 -03:00
Roberto Ierusalimschy
5cd99b82b7
set/getenvtable' -> set/getfenv'
2003-02-24 13:54:20 -03:00
Roberto Ierusalimschy
07e210e655
`require' returns value returned by package
2003-02-24 13:50:41 -03:00
Roberto Ierusalimschy
feb724c122
ULONG_MAX>>10 may not fit into an int (old bug)
2003-02-21 16:00:14 -03:00
Roberto Ierusalimschy
67f9a2a98f
details
2003-02-20 17:12:39 -03:00
Roberto Ierusalimschy
c4f9c887fc
expressions too complex for an ARM compiler...
2003-02-19 07:28:58 -03:00
Roberto Ierusalimschy
9866fb0ef1
set/getglobals' -> set/getenvtable'
2003-02-18 13:13:15 -03:00
Roberto Ierusalimschy
60c83ded30
small optimization for sizes of array constructors
2003-02-18 13:02:56 -03:00
Roberto Ierusalimschy
07948c3181
restore _REQUIREDNAME after requiring a file
2003-02-18 13:02:13 -03:00
Roberto Ierusalimschy
dce9a49a08
final version
2003-02-18 13:01:57 -03:00
Roberto Ierusalimschy
15db58a2f5
create arg table with correct size
2003-02-13 14:08:47 -02:00
Roberto Ierusalimschy
d6826dbc80
simpler way to count uses
2003-02-13 14:08:32 -02:00
Roberto Ierusalimschy
e75a6ae9ee
`defaultmeta' is always empty, but registry needs some space for
...
names and numbers (references)
2003-02-13 14:07:57 -02:00
Roberto Ierusalimschy
2866fb2dd0
reset _REQUIREDNAME after loading module
2003-02-13 14:07:37 -02:00
Roberto Ierusalimschy
4b6f436d67
unpack' uses getn' to get table size
2003-02-12 07:11:01 -02:00
Roberto Ierusalimschy
8f105d6b59
string.byte returns nil if index is out-of-range
2003-02-12 07:10:41 -02:00
Roberto Ierusalimschy
2fef8c772b
auxiliary function to check userdata with types
2003-02-11 13:32:31 -02:00
Roberto Ierusalimschy
7285fa393b
use C names for C types
2003-02-11 13:31:50 -02:00
Roberto Ierusalimschy
5085f09ce5
small optimizations
2003-02-11 13:24:52 -02:00
Roberto Ierusalimschy
d674626392
compatibility with '%' syntax is optional
2003-02-11 08:49:53 -02:00
Roberto Ierusalimschy
7a40cdbda0
different variables for number of upvalues and size of upvalue array
...
(makes code clearer)
2003-02-11 08:46:24 -02:00
Roberto Ierusalimschy
3cdeacbbfb
reference system also uses getn/setn (plus small corrections)
2003-02-11 07:44:38 -02:00
Roberto Ierusalimschy
6f207b15fb
resist errors in finalizers during lua_close
2003-02-10 15:32:50 -02:00
Roberto Ierusalimschy
3184314bf3
warning
2003-02-10 15:31:13 -02:00
Roberto Ierusalimschy
7964f7cbbd
more complete information for coroutine errors
2003-02-10 08:21:31 -02:00
Roberto Ierusalimschy
383a6e88f9
argv[0] may be NULL
2003-01-29 11:23:45 -02:00
Roberto Ierusalimschy
871166d7db
test for panic function
2003-01-29 08:27:53 -02:00
Roberto Ierusalimschy
592cf2334e
"panic" cannot happen in lua.c, with lua_cpcall +
...
argv[0] may be empty
2003-01-29 08:27:07 -02:00
Roberto Ierusalimschy
0175f8d5d1
dump/undump of upvalue names
2003-01-27 13:52:57 -02:00
Roberto Ierusalimschy
e79bf02f33
correct semantics for comparison metamethods (they are only valid
...
when both operands have the same metamethod).
2003-01-27 13:12:52 -02:00
Roberto Ierusalimschy
41ed3c4771
getn/setn in C moved to lauxlib
2003-01-27 11:46:16 -02:00
Roberto Ierusalimschy
635b7c707d
details
2003-01-27 11:00:43 -02:00
Roberto Ierusalimschy
83f0d6ef1a
DEPRECATED (new manual uses an independent format instead of LaTeX)
2003-01-24 14:38:18 -02:00
Roberto Ierusalimschy
3088ebd95b
last changes before leaving Latex
2003-01-24 07:14:54 -02:00
Roberto Ierusalimschy
797d964df9
detail
2003-01-23 09:34:18 -02:00
Roberto Ierusalimschy
e44e579dc1
bug: luaD_protectedparser must protect its garbage collection too
2003-01-23 09:31:38 -02:00
Roberto Ierusalimschy
a153cafd8d
starting translation to new format (@comand{...}).
2003-01-22 14:29:38 -02:00
Roberto Ierusalimschy
3b5158f2a1
corrections from Asko Kauppi
2003-01-21 15:45:11 -02:00
Roberto Ierusalimschy
60a8b94fd0
corrections/suggestions by Ed Ferguson
2003-01-20 09:03:05 -02:00
Roberto Ierusalimschy
c499442e5f
compatibility macros must be available by default
2003-01-17 13:28:09 -02:00
Roberto Ierusalimschy
9a5bab82ff
use the more modern _POSIX_C_SOURCE instead of older _POSIX_SOURCE
2003-01-17 13:27:28 -02:00
Roberto Ierusalimschy
32fd039bb5
`openlib' functions return new module
2002-12-20 08:26:33 -02:00
Roberto Ierusalimschy
75f73172c4
bug: `resume' was checking the wrong value for stack overflow
2002-12-20 07:55:56 -02:00
Roberto Ierusalimschy
754c630754
details
2002-12-19 11:21:08 -02:00
Roberto Ierusalimschy
dd8edecae1
new functions to manipulate upvales (get/setupvalue)
2002-12-19 09:11:55 -02:00
Roberto Ierusalimschy
28021c5c66
better explanation (+ example) for coroutines
2002-12-11 11:43:15 -02:00
Roberto Ierusalimschy
73517e86b0
OP_TFORLOOP uses extra stack space
2002-12-11 10:34:22 -02:00
Roberto Ierusalimschy
9e8face8d8
must move call results in the last iteration, too
2002-12-11 10:34:22 -02:00
Roberto Ierusalimschy
64864f094b
new options for debugging Lua (HARDSTACKTESTS & EXTERNMEMCHECK)
2002-12-06 15:20:45 -02:00
Roberto Ierusalimschy
9bd3fc1039
TFORLOOP makes a call that affects all values above it on the stack
2002-12-06 15:15:35 -02:00
Roberto Ierusalimschy
cc4a22ebe2
bug: scope of generic for variables is not sound
2002-12-06 15:09:00 -02:00
Roberto Ierusalimschy
acf62ddfbe
"load*" creates chunk with same global table than caller
2002-12-06 15:05:15 -02:00
Roberto Ierusalimschy
04f95ce879
hook counts are integers now
2002-12-05 15:50:10 -02:00
Roberto Ierusalimschy
27c6b4d422
each .c file defines its own name
2002-12-04 15:38:31 -02:00
Roberto Ierusalimschy
0bb8eb5151
new function `lua_cpcall'
2002-12-04 15:29:32 -02:00
Roberto Ierusalimschy
38da8c0d7d
new facilities to test memory overflow in main.c
2002-12-04 15:29:05 -02:00
Roberto Ierusalimschy
76de732745
avoid non-raw accesses to globals when variable may not exist
2002-12-04 13:38:25 -02:00
Roberto Ierusalimschy
90d7892007
new function `io.type'
2002-12-04 13:27:17 -02:00
Roberto Ierusalimschy
041cb96992
small bug: `write' must return three values in case of errors
2002-12-04 13:17:36 -02:00
Roberto Ierusalimschy
c75c3cfd19
avoid names `str...' (may conflict with string.h)
2002-12-02 10:06:10 -02:00
Roberto Ierusalimschy
24471525d7
details
2002-12-02 10:06:10 -02:00
Roberto Ierusalimschy
1f55dbc699
details
2002-11-26 10:53:29 -02:00
Roberto Ierusalimschy
c194a46bc5
detail
2002-11-26 06:59:48 -02:00
Roberto Ierusalimschy
8954bdc706
new `coroutine.status' function
2002-11-26 06:45:36 -02:00
Roberto Ierusalimschy
5a228bb1d8
new function `lua_version'
2002-11-25 15:50:14 -02:00
Roberto Ierusalimschy
5f698f8b6f
simpler interface to hooks + use of `int' to count hooks
2002-11-25 15:47:13 -02:00
Roberto Ierusalimschy
9b1c586b2f
renaming stringdump' -> string.dump'
2002-11-25 15:33:33 -02:00
Roberto Ierusalimschy
d9340154ac
`__tostring' for files + small bug (could do invalid read inside
...
a userdata when it was not a file)
2002-11-25 13:05:39 -02:00
Roberto Ierusalimschy
e47baca75a
warnings from Visual C++
2002-11-25 10:38:47 -02:00
Roberto Ierusalimschy
b8a680c114
resets hook count even in case of errors
2002-11-25 09:20:29 -02:00
Roberto Ierusalimschy
709b27b456
ULONG_MAX>>10 may not fit into an int
2002-11-25 09:16:48 -02:00
Roberto Ierusalimschy
dbc5451bea
comments
2002-11-22 16:01:46 -02:00
Roberto Ierusalimschy
2d2d45976c
separated control over C recursion level
2002-11-22 15:16:52 -02:00
Roberto Ierusalimschy
0050d983fc
make more clear "primitive" recursive definitions
2002-11-22 14:42:53 -02:00
Roberto Ierusalimschy
04b143ddf9
avoid C stack overflow during parsing
2002-11-22 14:35:20 -02:00
Roberto Ierusalimschy
007f229568
detail
2002-11-22 11:59:04 -02:00
Roberto Ierusalimschy
84488c5670
small bug: previous call may change `base'
2002-11-21 15:19:42 -02:00
Roberto Ierusalimschy
5142e630bf
new macro `condhardstacktests' to control hard stack tests
2002-11-21 15:19:11 -02:00
Roberto Ierusalimschy
010bbd9d9c
simpler definition for incr_top
2002-11-21 14:46:16 -02:00
Roberto Ierusalimschy
be00cd2a6b
easier way to keep `base' correct
2002-11-21 13:46:44 -02:00
Roberto Ierusalimschy
2e4e888de0
Lua functions must have a frame or a saved pc.
2002-11-21 13:46:20 -02:00
Roberto Ierusalimschy
ddc144e4d2
keep L->ci->base in L->base for faster access
2002-11-21 13:16:04 -02:00
Roberto Ierusalimschy
b48c6e7680
no problem keeping some dead meat while doing collection
2002-11-21 12:18:01 -02:00
Roberto Ierusalimschy
aff97fffc4
C functions cannot increase its top without filling the stack
2002-11-21 12:17:15 -02:00
Roberto Ierusalimschy
1648674653
must check GC every time it can create new objects
2002-11-21 12:16:52 -02:00
Roberto Ierusalimschy
d404f0c276
global_State must be deallocated (and so allocated) with NULL also
...
(otherwise it trys to decrement inside itself after its own free)
2002-11-21 12:14:42 -02:00
Roberto Ierusalimschy
48e42261ac
details
2002-11-19 15:42:32 -02:00
Roberto Ierusalimschy
be762f38bd
better organization of "malloc responsabilities"
2002-11-19 12:12:13 -02:00
Roberto Ierusalimschy
c8a79057f7
option -l does a require', instead of dofile'
2002-11-19 11:49:43 -02:00
Roberto Ierusalimschy
642af82e81
small bugs (state could keep its CI_HASFRAME attribute after returning)
2002-11-19 06:50:56 -02:00
Roberto Ierusalimschy
636c629e56
new assertions
2002-11-18 16:45:38 -02:00
Roberto Ierusalimschy
96ba5d0bc2
include file name in error messages
2002-11-18 14:53:19 -02:00
Roberto Ierusalimschy
f0185f7628
support for tests of yield inside hooks + better support for tests
...
with valgrind and other memory checkers
2002-11-18 13:24:27 -02:00
Roberto Ierusalimschy
9bab2cf55d
support for yield inside hooks
2002-11-18 13:24:11 -02:00
Roberto Ierusalimschy
c4ae00a3d1
details
2002-11-18 13:23:43 -02:00
Roberto Ierusalimschy
f4d3bc52f4
towards 5.0 beta
2002-11-18 12:39:34 -02:00
Roberto Ierusalimschy
18765d900e
messages
2002-11-18 09:20:01 -02:00
Roberto Ierusalimschy
43013b39cc
new representation for hooks (to allow asynchronous calls to sethook)
2002-11-18 09:01:55 -02:00
Roberto Ierusalimschy
94912d99fc
details
2002-11-14 14:59:16 -02:00
Roberto Ierusalimschy
b40c9f7a3c
better code to signal write barriers
2002-11-14 14:16:21 -02:00
Roberto Ierusalimschy
41fd639cab
documentation for write barriers
2002-11-14 14:15:53 -02:00
Roberto Ierusalimschy
a845a46cc8
C function may leave garbage on the stack (besides return values)
2002-11-14 13:42:05 -02:00
Roberto Ierusalimschy
097edd3884
better names for auxiliar functions
2002-11-14 13:41:38 -02:00
Roberto Ierusalimschy
5c5d9b2703
back to `__mode' metafield to specify weakness
2002-11-14 10:01:35 -02:00
Roberto Ierusalimschy
43d1a6af12
detail
2002-11-14 09:51:23 -02:00
Roberto Ierusalimschy
3010eb0536
all objects with several children (tables, closures, stacks, prototypes)
...
go to `gray' queue
2002-11-13 09:49:19 -02:00
Roberto Ierusalimschy
2f91f95d94
better control over GCObjects
2002-11-13 09:32:26 -02:00
Roberto Ierusalimschy
42dd080a2e
details
2002-11-12 12:34:18 -02:00
Roberto Ierusalimschy
9957f7d598
better way to open libraries
2002-11-11 11:28:06 -02:00
Roberto Ierusalimschy
ac27b7a842
avoid traversing extra elements when cleaning weak tables
2002-11-11 09:52:43 -02:00
Roberto Ierusalimschy
81e142fc14
detail (`key' is always on stack)
2002-11-07 14:03:33 -02:00
Roberto Ierusalimschy
63633c5b5f
better name for `lua_movethread'
2002-11-07 13:39:23 -02:00
Roberto Ierusalimschy
dff9be4224
new macros to distinguish different types of object moves (for future GC
...
evolution).
2002-11-07 13:37:10 -02:00
Roberto Ierusalimschy
118347d8c3
new API for coroutines
2002-11-06 17:08:00 -02:00
Roberto Ierusalimschy
6820da5096
detail
2002-11-04 10:31:44 -02:00
Roberto Ierusalimschy
c3eb4675b9
new module, ldump.c
2002-10-25 18:38:17 -03:00
Roberto Ierusalimschy
7e0f880bc5
C++ demands cast from void to specific types
2002-10-25 18:36:54 -03:00
Roberto Ierusalimschy
118e9cd843
new facility for dumping chunks
2002-10-25 18:31:28 -03:00
Roberto Ierusalimschy
de00d0d0ad
module for dumping chunks
2002-10-25 18:31:28 -03:00
Roberto Ierusalimschy
1713b64065
Writer type must be public (so, in lua.h)
2002-10-25 18:30:49 -03:00
Roberto Ierusalimschy
671dc6eec2
new version (from lhf)
2002-10-25 18:30:41 -03:00
Roberto Ierusalimschy
e356a43dc0
C needs "union" (unlike C++)
2002-10-25 18:30:00 -03:00
Roberto Ierusalimschy
f36038e42a
assertion must be always valid (not only in debug mode)
2002-10-25 18:29:20 -03:00
Roberto Ierusalimschy
96e15b8501
threads now are real Lua objects, subject to garbage collection
2002-10-25 17:05:28 -03:00
Roberto Ierusalimschy
0fd91b1b08
optional limits for table.concat
2002-10-23 16:08:23 -03:00
Roberto Ierusalimschy
a2b353e044
details
2002-10-23 16:08:13 -03:00
Roberto Ierusalimschy
92a2ef9dca
field `__globals' protect global tables
2002-10-22 16:41:08 -03:00
Roberto Ierusalimschy
4fb9110a6e
tests for compatibility functions lua_dostring/lua_dofile
2002-10-22 15:07:55 -03:00
Roberto Ierusalimschy
11886dc7b0
print error on stderr when _ALERT is not defined
2002-10-22 15:07:55 -03:00
Roberto Ierusalimschy
81bc5711a8
only one instance of registry and default metatable per global state
2002-10-22 14:58:14 -03:00
Roberto Ierusalimschy
6a77a6b73f
avoid too much precision when printing numbers
2002-10-22 14:21:25 -03:00
Roberto Ierusalimschy
84e0b1bc97
small changes in type configuration facilities
2002-10-22 14:18:28 -03:00
Roberto Ierusalimschy
6823a2f57f
better tokens for error messages
2002-10-22 13:45:52 -03:00
Roberto Ierusalimschy
313b2fe902
detail
2002-10-21 17:43:38 -03:00
Roberto Ierusalimschy
425e5813b0
free prototype in (more or less) the same order it is created by
...
`undump'
2002-10-21 17:41:46 -03:00
Roberto Ierusalimschy
6505503b49
do not pretend that file is closed when close fails
2002-10-21 17:41:24 -03:00
Roberto Ierusalimschy
ec748fcb0a
correct handling of opened files in presence of memory allocation
...
errors
2002-10-16 17:41:35 -03:00
Roberto Ierusalimschy
c196348717
in case of memory allocation errors, sizecode and sizelineinfo can
...
be different
2002-10-16 17:40:58 -03:00
Roberto Ierusalimschy
669129a6d8
io.lines() iterate over the standard input file
2002-10-11 17:40:32 -03:00
Roberto Ierusalimschy
46b063ef59
`undump' also uses private buffer
2002-10-09 10:42:01 -03:00
Roberto Ierusalimschy
e1d5153a33
details
2002-10-09 10:00:08 -03:00
Roberto Ierusalimschy
b3d0682fb9
use of different buffers for scanner and concatenation
2002-10-08 15:46:08 -03:00
Roberto Ierusalimschy
02afc892d5
new ANSI C does not assure that realloc(p,0) == free(p)
2002-10-08 15:45:07 -03:00
Roberto Ierusalimschy
fa2f1ec7ba
to avoid `strerror', define itself to something else;
...
nil has a special, fixed reference
2002-10-04 11:31:40 -03:00
Roberto Ierusalimschy
829befcc41
small optimization for object comparison
2002-10-04 11:31:03 -03:00
Roberto Ierusalimschy
d477e4ffd6
detail
2002-10-04 11:30:31 -03:00
Roberto Ierusalimschy
ce09af1e25
easier to define api_check' using assert'
2002-09-20 14:01:24 -03:00
Roberto Ierusalimschy
98d0b79613
EXIT_SUCCESS may be different from 0
2002-09-20 10:32:56 -03:00
Roberto Ierusalimschy
e8f35fc4ff
unification of __index & __gettable (and __newindex & __settable)
2002-09-19 17:12:47 -03:00
Roberto Ierusalimschy
6fb0fd5063
avoid `reclearing' weak tables
2002-09-19 16:54:22 -03:00
Roberto Ierusalimschy
565e6d74e1
state's buffer is used only for chars
2002-09-19 10:03:53 -03:00
Roberto Ierusalimschy
f6bc7884be
new generators for reading a file line by line
2002-09-17 17:35:54 -03:00
Roberto Ierusalimschy
32a5d96dfc
`setmetatable' cannot change protected objects
2002-09-16 16:49:45 -03:00
Roberto Ierusalimschy
8dae071f42
details
2002-09-16 16:18:01 -03:00
Roberto Ierusalimschy
afe1305b1a
avoid luaS_resize (which may need extra memory) during `main' activities
2002-09-05 16:57:40 -03:00
Roberto Ierusalimschy
728fa167d2
cannot raise memory error when realloc to smaller block
2002-09-05 16:57:08 -03:00
Roberto Ierusalimschy
1bdde38bd2
no more newlines at the end of error messages
2002-09-05 16:45:42 -03:00
Roberto Ierusalimschy
b2bc3b44b6
no more reserved word "global"
2002-09-03 08:57:38 -03:00
Roberto Ierusalimschy
7c0ccdfd61
avoid the use of "enum" in the API, as they do not have a fixed representation
2002-09-02 17:00:41 -03:00
Roberto Ierusalimschy
4964e7c8a0
details
2002-09-02 16:54:49 -03:00
Roberto Ierusalimschy
2c670baf24
avoid the use of "obvious" names in header files to avoid conflicts
2002-08-30 17:00:59 -03:00
Roberto Ierusalimschy
fdafd4f4a8
new structure for collectable objects, sharing a common header
2002-08-30 16:09:21 -03:00
Roberto Ierusalimschy
beeff4ccaf
GC metamethod stored in a weak metatable being collected together with
...
userdata may not be cleared properly
2002-08-30 16:08:30 -03:00
Roberto Ierusalimschy
12c4e48506
`frontier' patterns
2002-08-23 16:45:24 -03:00
Roberto Ierusalimschy
c78aaa9a70
better line number for function definitions
2002-08-22 16:51:08 -03:00
Roberto Ierusalimschy
4d7a554921
style for switch statements
2002-08-21 16:39:31 -03:00
Roberto Ierusalimschy
fbc23d0245
details
2002-08-21 15:56:33 -03:00
Roberto Ierusalimschy
81a8845e4f
detail
2002-08-21 11:57:48 -03:00
Roberto Ierusalimschy
6c283b2f4f
new simetric format for ABC instructions, to avoid exchanging operands
...
for `commutative' operators
2002-08-20 17:03:05 -03:00
Roberto Ierusalimschy
576bded513
details
2002-08-16 17:02:13 -03:00
Roberto Ierusalimschy
ecc7769de2
names...
2002-08-16 17:00:28 -03:00
Roberto Ierusalimschy
da19c436cc
cleaning the stage for generational collection
2002-08-16 11:45:55 -03:00
Roberto Ierusalimschy
0039feb9da
warning from Visual C
2002-08-16 11:45:18 -03:00
Roberto Ierusalimschy
aa5b15f271
detail
2002-08-14 17:10:33 -03:00
Roberto Ierusalimschy
653416d5c0
angles in radians(!)
2002-08-14 17:07:43 -03:00
Roberto Ierusalimschy
82a3be0671
some corrections + angles in radians
2002-08-14 17:07:25 -03:00
Roberto Ierusalimschy
94b5ad31f4
details
2002-08-13 17:00:51 -03:00
Roberto Ierusalimschy
90d26b9266
update of `debug' library (Lua binding)
2002-08-13 16:44:47 -03:00
Roberto Ierusalimschy
a048d71ef3
new LUA_USERCONFIG to include user options
2002-08-13 12:04:59 -03:00
Roberto Ierusalimschy
27f8a4a69e
towards 5.0 (one more step)...
2002-08-12 14:43:35 -03:00
Roberto Ierusalimschy
8e4ac679ff
use a linear count for count hook
2002-08-12 14:23:12 -03:00
Roberto Ierusalimschy
221b5be7b7
use of `LoadState' struct (instead of several separate arguments)
2002-08-12 10:37:19 -03:00
Roberto Ierusalimschy
b6791f5fa5
details
2002-08-12 10:37:19 -03:00
Roberto Ierusalimschy
3b058177af
towards 5.0 alpha...
2002-08-09 18:03:19 -03:00
Roberto Ierusalimschy
586e510577
details
2002-08-08 17:08:41 -03:00
Roberto Ierusalimschy
9998082839
external messages add their own extra information
2002-08-08 17:08:41 -03:00
Roberto Ierusalimschy
08da48a73c
detail
2002-08-07 17:55:00 -03:00
Roberto Ierusalimschy
00a40f4d6a
ensure proper rounding
2002-08-07 17:54:38 -03:00
Roberto Ierusalimschy
3bb5079dd4
ensure fixed order for library initialization
2002-08-07 17:54:17 -03:00
Roberto Ierusalimschy
5016f43aa4
(much) cleaner way to control function states
2002-08-07 16:22:39 -03:00
Roberto Ierusalimschy
c1c100a0c0
warnings in other compilers
2002-08-07 11:35:55 -03:00
Roberto Ierusalimschy
b6e2f1a86e
small bugs when stack is reallocated
2002-08-07 11:24:24 -03:00
Roberto Ierusalimschy
260e35f576
the usual...
2002-08-06 16:12:54 -03:00
Roberto Ierusalimschy
a56e01a9a0
towards 5.0 alpha...
2002-08-06 16:10:44 -03:00
Roberto Ierusalimschy
4664f2e927
any Lua closure has a table of globals (not only active functions)
2002-08-06 15:54:18 -03:00
Roberto Ierusalimschy
2e38c6ae5a
luadebug.h' content now is included in lua.h'
2002-08-06 15:01:50 -03:00
Roberto Ierusalimschy
d3dd337fca
lua_Chunkreader gets a lua_State, to avoid future incompatibilities
2002-08-06 14:26:45 -03:00
Roberto Ierusalimschy
634344d61f
new API for weak mode
2002-08-06 14:06:56 -03:00
Roberto Ierusalimschy
a2fa48a570
new (old?) error handling scheme
2002-08-06 12:32:22 -03:00
Roberto Ierusalimschy
8b2b8790b5
small bug: basic `ci' must have a valid func (base - 1)
2002-08-05 15:45:45 -03:00
Roberto Ierusalimschy
0b3d380f9f
internal names
2002-08-05 15:45:02 -03:00
Roberto Ierusalimschy
4e23699aa6
new implementation for error handling
2002-08-05 14:36:24 -03:00
Roberto Ierusalimschy
1c0ac3c0f5
new implementation for tailcall
2002-08-05 14:35:45 -03:00
Roberto Ierusalimschy
4a4f243795
new API for error handling
2002-08-05 11:51:47 -03:00
Roberto Ierusalimschy
0417a4bb0b
new implementation for tailcalls and error handling
2002-08-05 11:51:21 -03:00
Roberto Ierusalimschy
5037196f6f
new macros `ttis*'
2002-08-05 11:50:39 -03:00
Roberto Ierusalimschy
9fb80bde3c
tailcall is executed together with call
2002-08-05 11:46:43 -03:00
Roberto Ierusalimschy
2dcc31574f
new function xpcall
2002-08-05 11:46:02 -03:00
Roberto Ierusalimschy
390fc99a5c
xpcall now is builtin + new macros `ttis*'
2002-08-05 11:10:10 -03:00
Roberto Ierusalimschy
79c8edb6c4
new names for light userdata operations
2002-07-17 13:25:13 -03:00
Roberto Ierusalimschy
e5146fb01f
CallInfo has different fields for C functions and Lua functions
2002-07-16 11:26:56 -03:00
Roberto Ierusalimschy
ce6b930464
`isdst' should be a boolean (and not 0/1!!)
2002-07-12 15:54:53 -03:00
Roberto Ierusalimschy
ac7006d374
^D in interactive mode finish interaction (no questions asked)
2002-07-10 17:49:01 -03:00
Roberto Ierusalimschy
12bee999dd
new way to handle macros read_line/save_line
2002-07-10 17:44:34 -03:00
Roberto Ierusalimschy
a8c9eec426
bug: chunk can end just after a '\' in a string
2002-07-10 17:43:53 -03:00
Roberto Ierusalimschy
a885b826b3
LUA_ALERT is no longer used
2002-07-09 15:49:13 -03:00
Roberto Ierusalimschy
a960e62c3e
new options; no more _ALERT; no more getargs
2002-07-09 15:19:44 -03:00
Roberto Ierusalimschy
c51aa6ee33
details
2002-07-09 15:19:19 -03:00
Roberto Ierusalimschy
d88860131a
new macro `lua_isudataval' (for completude)
2002-07-09 11:58:28 -03:00
Roberto Ierusalimschy
44752fc9ce
hook count is quadratic
2002-07-08 17:22:08 -03:00
Roberto Ierusalimschy
39b2d58c39
new interface for debug hooks
2002-07-08 15:21:33 -03:00
Roberto Ierusalimschy
d2d24f0971
details to allow compilation of Lua as a single file
2002-07-08 15:14:36 -03:00
Roberto Ierusalimschy
0436c96866
C++ warning
2002-07-08 13:51:20 -03:00
Roberto Ierusalimschy
f8279f6cd8
optimizations for gettable (temporary)
2002-07-05 15:27:39 -03:00
Roberto Ierusalimschy
1fe280df72
new priority for and/or
2002-07-04 15:23:42 -03:00
Roberto Ierusalimschy
1ede98157d
strings are always `strong' in weaktables
2002-07-04 14:58:02 -03:00
Roberto Ierusalimschy
3e52573c72
details (error messages)
2002-07-04 09:29:32 -03:00
Roberto Ierusalimschy
84ad1eea81
use of NaN as key breaks some invariants
2002-07-02 14:54:23 -03:00
Roberto Ierusalimschy
b30ec2532c
details
2002-07-02 13:43:28 -03:00
Roberto Ierusalimschy
68ee518e81
only tables need `lua_number2int'
2002-07-01 16:31:10 -03:00
Roberto Ierusalimschy
76a73cb2ee
new getn' (and setn')
2002-07-01 16:25:28 -03:00
Roberto Ierusalimschy
aa3da1605c
`newproxy' uses its own weaktable
2002-07-01 16:23:58 -03:00
Roberto Ierusalimschy
9f4b5b5232
weak keys are removed only after finalization
2002-07-01 14:06:58 -03:00
Roberto Ierusalimschy
5fabed21a1
getglobals(0) is the C global table
2002-06-26 17:36:17 -03:00
Roberto Ierusalimschy
f67ccfbdeb
no more `lua_getn' function
2002-06-26 16:28:44 -03:00
Roberto Ierusalimschy
cfcf200806
concat' goes to table' library
2002-06-26 16:28:08 -03:00
Roberto Ierusalimschy
f32a8c0477
details (temporary?)
2002-06-26 13:37:39 -03:00
Roberto Ierusalimschy
88607acc2c
details
2002-06-26 13:37:23 -03:00
Roberto Ierusalimschy
6de93e2932
two new bugs in 4.0 :-( (both were already corrected in 5.0 :-)
2002-06-25 16:23:55 -03:00
Roberto Ierusalimschy
25dc9b7faf
new functions dofile' and pairs'; correct way to check proxies
2002-06-25 16:19:33 -03:00
Roberto Ierusalimschy
78c507b7b8
lua_upcall' -> lua_call'
2002-06-25 16:18:49 -03:00
Roberto Ierusalimschy
69906cb56f
error message ends with `\n' (is already formatted)
2002-06-25 16:18:20 -03:00
Roberto Ierusalimschy
9d6556fd87
userdata are removed from weaktables before invoking their GC fallbacks
2002-06-25 16:17:42 -03:00
Roberto Ierusalimschy
35707e94f3
__weakmode' -> __mode'
2002-06-25 16:17:22 -03:00
Roberto Ierusalimschy
89b102bd1d
new `luaL_weakregistry' function
2002-06-25 16:15:21 -03:00
Roberto Ierusalimschy
fdfd5b44ee
TM_GETTABLE/TM_SETTABLE don't need fast access anymore
2002-06-24 17:18:38 -03:00
Roberto Ierusalimschy
1a4c428d6d
new function `newproxy'
2002-06-24 14:23:16 -03:00
Roberto Ierusalimschy
2394604d10
assertion may fail when closing a state
2002-06-24 14:19:43 -03:00
Roberto Ierusalimschy
922f36a05b
details
2002-06-24 12:07:21 -03:00
Roberto Ierusalimschy
ad41fc11eb
details in arithmetic implementation
2002-06-24 11:11:14 -03:00
Roberto Ierusalimschy
e182cf452f
`^' operator is defined in registry.__pow
2002-06-24 10:54:13 -03:00
Roberto Ierusalimschy
e34f282365
`luaV_gettable' returns element position
2002-06-24 10:08:45 -03:00
Roberto Ierusalimschy
3941af53ad
first implementation of independent global table per function
2002-06-20 17:41:46 -03:00
Roberto Ierusalimschy
5610fdd776
avoid using obsolete lua_dostring
2002-06-20 17:40:38 -03:00
Roberto Ierusalimschy
b449a5e574
more robust when printing error messages
2002-06-20 17:40:09 -03:00
Roberto Ierusalimschy
e572dffa15
small bug building error messages
2002-06-20 17:39:44 -03:00
Roberto Ierusalimschy
5893fcb71a
accept option arguments without spaces (e.g. "-eprint(a)")
2002-06-18 14:43:49 -03:00
Roberto Ierusalimschy
eec0905173
better tests (assertions) for debug hooks
2002-06-18 14:42:52 -03:00
Roberto Ierusalimschy
a44f37513b
better treatment for error messages
2002-06-18 14:12:05 -03:00
Roberto Ierusalimschy
6ee2dbdfe9
traceback stops at first protected call
2002-06-18 14:10:43 -03:00
Roberto Ierusalimschy
1dbe708aa8
new protocol for error handling
2002-06-18 12:19:27 -03:00
Roberto Ierusalimschy
8f080fd683
`traceback' returns only the traceback
2002-06-18 12:17:58 -03:00
Roberto Ierusalimschy
d8678edddc
luaL_verror -> luaL_error
2002-06-18 12:16:18 -03:00
Roberto Ierusalimschy
e812aa2002
avoid assignments to TObject access macros
2002-06-17 10:51:01 -03:00
Roberto Ierusalimschy
c31494df26
avoid gotos when possible
2002-06-14 14:21:32 -03:00
Roberto Ierusalimschy
8fd0f6a82b
new macro to check conditions on expression macros
2002-06-13 10:45:31 -03:00
Roberto Ierusalimschy
eb3de8768a
rawcall' -> upcall' (unprotected call)
2002-06-13 10:44:50 -03:00
Roberto Ierusalimschy
864c96f36c
new fallback for equality `__eq'
2002-06-13 10:39:55 -03:00
Roberto Ierusalimschy
0052930ffe
details
2002-06-12 16:16:00 -03:00
Roberto Ierusalimschy
eeab473fc8
new fallback __le (less equal), for partial order
2002-06-12 11:56:22 -03:00
Roberto Ierusalimschy
6b8cdc9cdd
Lua now uses only `realloc' for all its memory management
2002-06-11 13:26:12 -03:00
Roberto Ierusalimschy
000d081fd0
warnings from other compilers
2002-06-06 15:17:33 -03:00
Roberto Ierusalimschy
65d66ba275
new "local function"
2002-06-06 14:29:53 -03:00
Roberto Ierusalimschy
cff22f57dd
some refactoring
2002-06-06 10:52:37 -03:00
Roberto Ierusalimschy
168ea16acb
details
2002-06-06 10:16:02 -03:00
Roberto Ierusalimschy
dc6e6c48bb
on the way to 5.0
2002-06-06 09:49:28 -03:00
Roberto Ierusalimschy
e3cddc950c
C is not C++...
2002-06-06 09:43:08 -03:00
Roberto Ierusalimschy
630acb2048
_ERRORMESSAGE `accepts' non-string arguments (at least for now...)
2002-06-06 09:40:36 -03:00
Roberto Ierusalimschy
16f4723398
names & names
2002-06-06 09:40:22 -03:00
Roberto Ierusalimschy
f1c43bbe19
new function `xpcall' (at least for now...)
2002-06-06 09:39:48 -03:00
Roberto Ierusalimschy
5a8f383e60
io.close() closes standard output file; `close' now is method
2002-06-05 14:42:03 -03:00
Roberto Ierusalimschy
711b936849
new versions from lhf
2002-06-05 14:26:23 -03:00
Roberto Ierusalimschy
5b8ee9fa8d
new names for standard libraries
2002-06-05 14:24:04 -03:00
Roberto Ierusalimschy
2cd6161060
don't need stdio
2002-06-05 13:59:52 -03:00
Roberto Ierusalimschy
a102221a0b
better error messages
2002-06-05 13:59:37 -03:00
Roberto Ierusalimschy
6dd0b6c62b
details
2002-06-05 13:59:21 -03:00
Roberto Ierusalimschy
fa23301251
defintions for lua_number2str and lua_str2number don't need to be public
2002-06-05 09:34:19 -03:00
Roberto Ierusalimschy
94c2449d25
undump may return LUA_ERRRUN
2002-06-03 17:12:50 -03:00
Roberto Ierusalimschy
c398a02110
uses `isspace' to recognize space characters
2002-06-03 17:12:21 -03:00
Roberto Ierusalimschy
ad7103ea3a
lua_load* defined in auxlib (and so renamed to luaL_load*)
2002-06-03 17:11:41 -03:00
Roberto Ierusalimschy
0079e0f57c
core tests whether file is binary
2002-06-03 17:11:07 -03:00
Roberto Ierusalimschy
cfff013586
detail
2002-06-03 14:47:18 -03:00
Roberto Ierusalimschy
35a22ed1ab
lua_load* replaced by a simple lua_load
2002-06-03 14:46:34 -03:00
Roberto Ierusalimschy
ff91b355f4
no more use of stdio inside the core (except for `tostring'...)
2002-06-03 11:09:57 -03:00
Roberto Ierusalimschy
5094c37988
strconc' -> concat'
2002-06-03 11:08:43 -03:00
Roberto Ierusalimschy
46c471d7e9
new `__newindex' eventfield
2002-05-27 17:35:40 -03:00
Roberto Ierusalimschy
859ecf36b6
new copyright notice
2002-05-23 17:29:05 -03:00
Roberto Ierusalimschy
a1700bbc50
details
2002-05-23 16:43:04 -03:00
Roberto Ierusalimschy
8876a1bf92
details
2002-05-20 16:51:06 -03:00
Roberto Ierusalimschy
f53fd8d5f5
_ALERT is a private afair of lua.c
2002-05-16 16:09:19 -03:00
Roberto Ierusalimschy
955def0348
new names for string formating functions
2002-05-16 15:39:46 -03:00
Roberto Ierusalimschy
9c3b3f82fe
new commands to test `load'
2002-05-16 11:59:49 -03:00
Roberto Ierusalimschy
b7a0503c1d
new format for error messages
2002-05-15 15:57:44 -03:00
Roberto Ierusalimschy
1c328a191a
no more `global' declarations
2002-05-14 14:52:22 -03:00
Roberto Ierusalimschy
58bf77bc7f
no more extra space when growing hash
2002-05-13 10:38:59 -03:00
Roberto Ierusalimschy
8da6fe62d8
`nexti' returns correct indices
2002-05-13 10:10:58 -03:00
Roberto Ierusalimschy
c18fe57e54
quick-and-dirty function to print code (for debugging Lua)
2002-05-13 10:10:04 -03:00
Roberto Ierusalimschy
af19d55635
generic for also coded to make test at the end of the loop
2002-05-13 10:09:00 -03:00
Roberto Ierusalimschy
b55fded18c
details about jump optimization
2002-05-13 10:07:48 -03:00
Roberto Ierusalimschy
2dadc81822
cleaner implementation of code generation for jumps
2002-05-10 16:22:11 -03:00
Roberto Ierusalimschy
b487975344
optimization for `while' (first version)
2002-05-10 14:02:32 -03:00
Roberto Ierusalimschy
94e5545806
comment
2002-05-09 15:00:38 -03:00
Roberto Ierusalimschy
78b40bf57d
`skip' instructions must be followed by a jump
2002-05-09 11:14:34 -03:00
Roberto Ierusalimschy
01f1ac36b1
`global' tables (registry, etc.) stored in proper place, not in the stack
2002-05-08 14:34:23 -03:00
Roberto Ierusalimschy
a4d06736d4
correct implementation for arrays of size 1
2002-05-08 14:34:00 -03:00
Roberto Ierusalimschy
dea6b6da94
new function lua_vpushstr' to replace uses of sprintf'
2002-05-07 14:36:56 -03:00
Roberto Ierusalimschy
71144e3ff0
errors `return' int, to avoid warnings
...
+ home-made `sprintf' (first version)
2002-05-06 16:05:10 -03:00
Roberto Ierusalimschy
0dbf0c5953
new format for test intructions (handle NaN correctly)
2002-05-06 12:51:41 -03:00
Roberto Ierusalimschy
85dcb411a8
all textual errors go through `luaL_verror'
2002-05-02 14:12:27 -03:00
Roberto Ierusalimschy
3c6a383d62
avoid limits in filename size
2002-05-02 13:55:55 -03:00
Roberto Ierusalimschy
9a0f0dcc77
precompiler may create functions without `lineinfo'
2002-05-02 10:06:20 -03:00
Roberto Ierusalimschy
751cd867d3
new way to handle errors
2002-05-01 17:48:12 -03:00
Roberto Ierusalimschy
b36b2a061c
new way to handle errors
2002-05-01 17:40:42 -03:00
Roberto Ierusalimschy
ab52fc6097
new macro to `fix' strings
2002-04-30 10:01:48 -03:00
Roberto Ierusalimschy
e68d0df1c6
function `zsopen' is not used
2002-04-29 09:37:41 -03:00
Roberto Ierusalimschy
9b38a696d5
avoid names that differ only in capitalization
2002-04-24 17:07:46 -03:00
Roberto Ierusalimschy
383e8b9e77
use of a common `dummynode' for all empty tables
2002-04-23 12:04:39 -03:00
Roberto Ierusalimschy
f1a1bb23fe
good stack limit to compute ack(8,3)
2002-04-23 11:59:35 -03:00
Roberto Ierusalimschy
151ba1cc7b
details
2002-04-23 11:59:22 -03:00
Roberto Ierusalimschy
ee4859b3e3
new way to handle errors (temporary version)
2002-04-22 11:40:50 -03:00
Roberto Ierusalimschy
f388ee4a82
new way to handle errors
2002-04-22 11:40:23 -03:00
Roberto Ierusalimschy
30ad4c75db
bug: 'local a,b; a,b = 1,f()' did not close f()
2002-04-22 11:38:52 -03:00
Roberto Ierusalimschy
3ee1efa7b2
some simplifications
2002-04-22 11:37:09 -03:00
Roberto Ierusalimschy
c11d374c59
`panic' function configurable via API
2002-04-16 14:08:28 -03:00
Roberto Ierusalimschy
13230c451b
details
2002-04-16 09:00:02 -03:00
Roberto Ierusalimschy
391c5459cb
new implementation for `require' (with templates)
2002-04-15 17:54:41 -03:00
Roberto Ierusalimschy
62dd4cbe91
check for errors while loading file
2002-04-15 16:34:42 -03:00
Roberto Ierusalimschy
ae5283dc36
co' library goes with basic library (and not with tab')
2002-04-12 16:57:29 -03:00
Roberto Ierusalimschy
1ce6cb6032
no more option `*u' in read (too complex)
2002-04-12 16:56:25 -03:00
Roberto Ierusalimschy
11c63bc3af
error in calls signalled in first line (instead of last)
2002-04-10 16:14:45 -03:00
Roberto Ierusalimschy
f1f271ae76
details
2002-04-10 15:05:08 -03:00
Roberto Ierusalimschy
6c7334a9ac
line trace uses savedpc' to save last pc' seen
2002-04-10 09:11:07 -03:00
Roberto Ierusalimschy
8e1e618606
baselib' splited in baselib' and `tablib'
2002-04-09 17:19:06 -03:00
Roberto Ierusalimschy
af4721f7a3
library with table manipulation functions
2002-04-09 17:19:06 -03:00
Roberto Ierusalimschy
018e50ad7f
use addresses as keys to hooks
2002-04-09 16:48:08 -03:00
Roberto Ierusalimschy
7b65328c8e
new semantics for `generic for' (with state)
2002-04-09 16:47:44 -03:00
Roberto Ierusalimschy
d2e05589d7
bug: `resume' was returning its arguments, too
2002-04-09 16:46:56 -03:00
Roberto Ierusalimschy
237969724f
support for light' userdata + simpler support for boxed' udata
2002-04-05 15:54:31 -03:00
Roberto Ierusalimschy
f438d00ef3
correct #args for calls with self (a:foo(...))
2002-04-04 17:25:55 -03:00
Roberto Ierusalimschy
c3b90061ea
new design for iolib (object style)
2002-04-04 17:24:56 -03:00
Roberto Ierusalimschy
a2e414d679
`pow' must be global (as the implementation of '^')
2002-04-04 17:20:49 -03:00
Roberto Ierusalimschy
93bcb65a9b
debug interface uses method' to describe calls like a:foo()'
2002-04-04 14:21:31 -03:00
Roberto Ierusalimschy
49c95648a0
getmetatable doesn't push nil when there is no metatable
2002-04-02 17:43:18 -03:00
Roberto Ierusalimschy
13ab5a6bb1
details
2002-04-02 17:43:08 -03:00
Roberto Ierusalimschy
cd99bbcd0d
better support for new libraries
2002-04-02 17:42:49 -03:00
Roberto Ierusalimschy
2cbbf7e95a
tostring' uses __tostring' when available
2002-04-02 17:42:20 -03:00
Roberto Ierusalimschy
e5919be1a7
bug: end of block may not be end of stat
2002-04-02 17:34:15 -03:00
Roberto Ierusalimschy
b795d4b561
details
2002-04-01 11:42:33 -03:00
Roberto Ierusalimschy
c371413530
small bug if LUA_USERINIT leaves garbage on the stack
2002-03-27 15:00:13 -03:00
Roberto Ierusalimschy
d1f220217b
when possible, library functions accept nil as none
2002-03-27 12:30:41 -03:00
Roberto Ierusalimschy
405e3a4597
metatable always return some value
2002-03-27 09:49:53 -03:00
Roberto Ierusalimschy
81215cd59f
simpler way to control stack overflow
2002-03-26 17:46:10 -03:00
Roberto Ierusalimschy
0b9b53e21c
details
2002-03-26 15:55:50 -03:00
Roberto Ierusalimschy
44a5484d73
small bug (L->ci->top may be larger than L->top...)
2002-03-25 16:45:06 -03:00
Roberto Ierusalimschy
801aaf37b1
simpler implementation for line information
2002-03-25 14:47:14 -03:00
Roberto Ierusalimschy
00af2faae7
first implementation of proper tail call
2002-03-22 13:54:31 -03:00
Roberto Ierusalimschy
e9ef7ed2d3
first implementation for tail call
2002-03-21 17:32:22 -03:00
Roberto Ierusalimschy
2626708b72
details
2002-03-21 17:31:43 -03:00
Roberto Ierusalimschy
19ac0fadc9
don't need to mark the stacks twice ;-)
2002-03-20 15:54:29 -03:00
Roberto Ierusalimschy
ca2ceef659
simpler solution for finalizing udata
2002-03-20 15:37:28 -03:00
Roberto Ierusalimschy
5023aaee0a
reserve one more bit for GC
2002-03-20 15:37:13 -03:00
Roberto Ierusalimschy
88c9bf99de
standard libraries in packages
2002-03-20 09:54:08 -03:00
Roberto Ierusalimschy
63a614e145
some improvements in stack control
2002-03-20 09:52:32 -03:00
Roberto Ierusalimschy
48e732e07d
improvements in stack control
2002-03-20 09:51:29 -03:00
Roberto Ierusalimschy
938092489b
erroneous objects may not live in the stack
2002-03-19 09:45:25 -03:00
Roberto Ierusalimschy
578d1da00d
new names for tag methods
2002-03-18 17:24:14 -03:00
Roberto Ierusalimschy
24d6d0528d
api.c only needs to check pushes when api_check is defined
2002-03-18 17:11:52 -03:00
Roberto Ierusalimschy
0b00e7f1a2
new macro to convert double->int
2002-03-18 15:18:35 -03:00
Roberto Ierusalimschy
b7ed502dea
configurable macros should live in llimits.h
2002-03-18 15:16:16 -03:00
Roberto Ierusalimschy
58badbab99
special treatment for 'global in nil'
2002-03-18 11:49:46 -03:00
Roberto Ierusalimschy
da81845cd5
an error may call GC and find an incomplete `ci'
2002-03-15 14:17:16 -03:00
Roberto Ierusalimschy
9681ff09db
small optimization when returning a single local value
2002-03-14 15:32:37 -03:00
Roberto Ierusalimschy
7ff21273d6
implementation of `global' statement
2002-03-14 15:01:52 -03:00
Roberto Ierusalimschy
207dad8606
comments
2002-03-14 13:50:06 -03:00
Roberto Ierusalimschy
c97dc294a9
first implementation of `gfind'
2002-03-11 10:29:40 -03:00
Roberto Ierusalimschy
71c716e5a8
avoid C identifiers beginning with '_'
2002-03-11 09:45:00 -03:00
Roberto Ierusalimschy
51ad2f1162
error message
2002-03-08 16:25:24 -03:00
Roberto Ierusalimschy
ecda9c1972
details
2002-03-08 16:17:59 -03:00
Roberto Ierusalimschy
e19eba7219
cannot store `top' in local variables...
2002-03-08 16:11:03 -03:00
Roberto Ierusalimschy
bd8b9c94b3
generic for (with any number of control variables)
2002-03-08 16:10:32 -03:00
Roberto Ierusalimschy
4db04555f0
implementation of long comments
2002-03-08 16:07:01 -03:00
Roberto Ierusalimschy
c16a35d669
lua_stackspace' replaced by lua_checkstack'
2002-03-07 15:15:10 -03:00
Roberto Ierusalimschy
8f837e83b2
using `ci->top' to control acceptable indices in C calls
2002-03-07 15:14:29 -03:00
Roberto Ierusalimschy
6658b9588f
details
2002-03-07 15:11:51 -03:00
Roberto Ierusalimschy
457d88eaaa
configurable minimum size for the string table
2002-03-05 13:22:54 -03:00
Roberto Ierusalimschy
8a1a512c64
lu_byte is enough for those fields (maxstack < 256)
2002-03-05 09:42:47 -03:00
Roberto Ierusalimschy
6b0c38c2e7
`inline' of tonumber
2002-03-04 18:33:09 -03:00
Roberto Ierusalimschy
1a3f175640
small optimization
2002-03-04 18:32:34 -03:00
Roberto Ierusalimschy
88c7b574cb
`luaA_index' is a local macro now
2002-03-04 18:29:41 -03:00
Roberto Ierusalimschy
51bf91a970
detail
2002-03-04 12:40:04 -03:00
Roberto Ierusalimschy
1b6315ba10
not all unfinished strings with "..." end in EOF
2002-03-04 12:27:14 -03:00
Roberto Ierusalimschy
3b001d9a9d
more tests for boolean API
2002-03-04 12:26:56 -03:00
Roberto Ierusalimschy
c36b5cc726
detail
2002-02-15 13:15:10 -02:00
Roberto Ierusalimschy
2c1eb62a08
get error messages from luaL_errstr
2002-02-14 20:23:43 -02:00
Roberto Ierusalimschy
63e2d92123
no more -DOLD_ANSI option + details
2002-02-14 19:49:33 -02:00
Roberto Ierusalimschy
e966dd93be
towards next version...
2002-02-14 19:48:32 -02:00
Roberto Ierusalimschy
2f8e3c5543
prints any results returned by chunk
2002-02-14 19:47:50 -02:00
Roberto Ierusalimschy
b0a5e156b8
no more maximum stack size
2002-02-14 19:47:29 -02:00
Roberto Ierusalimschy
ac178ee478
new constructor syntax + new generic `for'
2002-02-14 19:46:58 -02:00
Roberto Ierusalimschy
1e602a61b3
new generic `for'
2002-02-14 19:46:43 -02:00
Roberto Ierusalimschy
57fb51f975
luaH_next' works like next'
2002-02-14 19:46:13 -02:00
Roberto Ierusalimschy
1c423d2661
LFIELDS_PER_FLUSH is an opcode detail
2002-02-14 19:43:01 -02:00
Roberto Ierusalimschy
b3ffaca638
details
2002-02-14 19:41:53 -02:00
Roberto Ierusalimschy
bee86e23be
luaH_next' works like next' + better hash for pointers
2002-02-14 19:41:08 -02:00
Roberto Ierusalimschy
0056ed4135
better(?) order for types (nil == 0)
2002-02-14 19:40:29 -02:00
Roberto Ierusalimschy
e01f5e6809
better order of record fields for 64-bit machines
2002-02-08 20:42:41 -02:00
Roberto Ierusalimschy
cbfc581990
details.
2002-02-08 20:41:50 -02:00
Roberto Ierusalimschy
d3651c1d88
`getstr' now gives const char *
2002-02-08 20:41:09 -02:00
Roberto Ierusalimschy
57a7baafb9
error message compatible with incomplete lines of lua.c
2002-02-08 20:40:27 -02:00
Roberto Ierusalimschy
252e01e398
`setlocale' may be used to query the current locale
2002-02-08 20:39:56 -02:00
Roberto Ierusalimschy
87b0e3d477
no more `lua_istrue' function
2002-02-08 20:39:36 -02:00
Roberto Ierusalimschy
cb50fcf42d
incomplete lines (by lhf)
2002-02-07 15:27:12 -02:00
Roberto Ierusalimschy
c6a108e012
test for lua_pushbool
2002-02-07 15:26:33 -02:00
Roberto Ierusalimschy
d5ceb369b1
boolean type must be 0 or 1
2002-02-07 15:26:10 -02:00
Roberto Ierusalimschy
86a4de256e
no more lua_[gs]etstr
2002-02-07 15:25:36 -02:00
Roberto Ierusalimschy
53aaee6ee6
comments
2002-02-07 15:25:12 -02:00
Roberto Ierusalimschy
67bda7e136
details.
2002-02-07 15:24:05 -02:00
Roberto Ierusalimschy
7c8f1823e7
bug: true 1 != true 2 + no more lua_getstr + some new macros
2002-02-07 15:22:53 -02:00
Roberto Ierusalimschy
ca181f31e4
line number in listcode (and tests for replace)
2002-02-05 20:40:05 -02:00
Roberto Ierusalimschy
38b0e6128d
simpler implementation for `for' loops
2002-02-05 20:39:12 -02:00
Roberto Ierusalimschy
addbe8c8b0
protected execution of `resume'
2002-02-05 20:38:37 -02:00
Roberto Ierusalimschy
6bb5cb1cbd
comments
2002-02-05 20:37:26 -02:00
Roberto Ierusalimschy
d070506a25
new function luaL_errstr
2002-02-05 20:36:52 -02:00
Roberto Ierusalimschy
0a87d9d334
new function `lua_replace'
2002-02-05 20:35:58 -02:00
Roberto Ierusalimschy
f856fdeabd
details
2002-01-30 15:28:05 -02:00
Roberto Ierusalimschy
653977a0ac
callhook can be static
2002-01-30 15:27:53 -02:00
Roberto Ierusalimschy
d6fd33e76f
eventtable' renamed to metatable'
2002-01-30 15:26:44 -02:00
Roberto Ierusalimschy
50e2952593
first version of dynamic stack
2002-01-25 20:14:54 -02:00
Roberto Ierusalimschy
b217ae644e
details
2002-01-25 20:14:09 -02:00
Roberto Ierusalimschy
a048cc9676
nil is a `valid' eventtable
2002-01-25 19:55:41 -02:00
Roberto Ierusalimschy
eb262bc617
2^15 does not fit in a 16-bit int
2002-01-25 19:51:33 -02:00
Roberto Ierusalimschy
74907fb71e
OP_LOADINT can be done by OP_LOADK
2002-01-25 19:50:39 -02:00
Roberto Ierusalimschy
b38e594ed7
small improvements
2002-01-18 15:39:40 -02:00
Roberto Ierusalimschy
448517e47e
no more linehook field in CallInfo
2002-01-18 15:39:06 -02:00
Roberto Ierusalimschy
931ee346e3
legacy declaration
2002-01-18 15:38:13 -02:00
Roberto Ierusalimschy
dea98702c9
preparations for stack reallocation
2002-01-16 20:04:50 -02:00
Roberto Ierusalimschy
7ab7703b53
cleaner semantics for test instructions (skips)
2002-01-16 20:03:57 -02:00
Roberto Ierusalimschy
566310fa04
small optimization
2002-01-16 20:02:46 -02:00
Roberto Ierusalimschy
6272c843de
yield' passes its arguments to resume'
2002-01-11 18:27:41 -02:00
Roberto Ierusalimschy
5d14ce612b
details
2002-01-11 18:27:11 -02:00
Roberto Ierusalimschy
d56d4cf776
distinct functions to create/destroy states and threads
2002-01-11 18:26:52 -02:00
Roberto Ierusalimschy
b7ae43d457
detail
2002-01-11 18:23:01 -02:00
Roberto Ierusalimschy
f083812c02
first implementation of coroutines
2002-01-09 20:02:47 -02:00
Roberto Ierusalimschy
3533382a1e
dependencies updated
2002-01-09 19:59:24 -02:00
Roberto Ierusalimschy
ea2a75d19e
new macro lua_userstateopen
2002-01-09 19:51:06 -02:00
Roberto Ierusalimschy
b3bb0f132b
new interface for weak modes
2002-01-09 19:50:35 -02:00
Roberto Ierusalimschy
facfec0687
small optimizations
2002-01-03 15:42:57 -02:00
Roberto Ierusalimschy
34df9976a9
some compatibility macros
2002-01-03 15:28:58 -02:00
Roberto Ierusalimschy
cfaa8fbf1d
better check for option in `strfind'
2002-01-03 15:27:43 -02:00
Roberto Ierusalimschy
f42cc90d2d
some warnings
2001-12-21 15:31:35 -02:00
Roberto Ierusalimschy
9d2e454d6f
BUG: seg. fault when rawget/rawset get extra arguments
2001-12-21 15:30:31 -02:00
Roberto Ierusalimschy
09e15692f3
rename of lua_isnull to lua_isnone
2001-12-20 19:27:12 -02:00
Roberto Ierusalimschy
42754c0f15
small optimizations
2001-12-20 19:26:52 -02:00
Roberto Ierusalimschy
18afb90349
first version of stackless Lua
2001-12-20 13:13:38 -02:00
Roberto Ierusalimschy
22dd271cbb
another bug in next (when n is a power of 2)
2001-12-19 16:11:00 -02:00
Roberto Ierusalimschy
e04f7ed450
first version of Lua "stackless"
2001-12-18 18:52:30 -02:00
Roberto Ierusalimschy
101cee3032
LUA_ERRERR also cannot generate error message
2001-12-13 16:11:02 -02:00
Roberto Ierusalimschy
eb7312d9be
comments
2001-12-13 16:10:55 -02:00
Roberto Ierusalimschy
21259a50e1
run GC tag methods in protected mod
2001-12-12 15:47:33 -02:00
Roberto Ierusalimschy
9aff171f3b
new type `boolean'
2001-12-11 20:48:44 -02:00
Roberto Ierusalimschy
ed9be5e1f0
reentrant implementation of garbage collection
2001-12-11 14:52:57 -02:00
Roberto Ierusalimschy
9d801f43d4
details
2001-12-10 20:12:08 -02:00
Roberto Ierusalimschy
e043b72a55
simpler way to collect userdata
2001-12-10 20:11:23 -02:00
Roberto Ierusalimschy
a4c35a3269
it doesn't pay to optimize absence when it is an error
2001-12-10 20:10:30 -02:00
Roberto Ierusalimschy
9cd36059ad
new API functions lua_getstr/lua_setstr
2001-12-10 20:09:51 -02:00
Roberto Ierusalimschy
592a309177
tag system replaced by event tables
2001-12-05 18:15:18 -02:00
Roberto Ierusalimschy
413fc7334b
new implementation for lua upvalues (sugested by E.T.): simpler and solves
...
a bug for multi-stacks
2001-11-29 18:22:22 -02:00
Roberto Ierusalimschy
fca0a12e23
avoid clashing names between macros and fields
2001-11-29 18:21:46 -02:00
Roberto Ierusalimschy
72659a0605
no more explicit support for wide-chars; too much troble...
2001-11-28 18:13:13 -02:00
Roberto Ierusalimschy
dfaf8c5291
details
2001-11-27 18:56:47 -02:00
Roberto Ierusalimschy
657f65211a
bug: `next' did not work for numeric indices
2001-11-16 14:29:51 -02:00
Roberto Ierusalimschy
39395e1211
`luaX_syntaxerror' does not need to be public
2001-11-16 14:29:10 -02:00
Roberto Ierusalimschy
26bf2adace
optimizations for space in LClosures and time cleanning weak tables
2001-11-06 19:41:53 -02:00
Roberto Ierusalimschy
fd48dcc7c8
details.
2001-11-06 19:41:43 -02:00
Roberto Ierusalimschy
617008f552
field G renamed to _G to avoid problemas with bugged macro-systems
...
(there is a macro named G too)
2001-11-06 19:40:51 -02:00
Roberto Ierusalimschy
ec9d8308b4
global table is also pseudo-index
2001-10-31 18:31:38 -02:00
Roberto Ierusalimschy
af59848219
tables of globals accessible through pseudo-index in C API
2001-10-31 17:58:11 -02:00
Roberto Ierusalimschy
46347d768e
`ref' support goes to auxlib
2001-10-31 17:40:14 -02:00
Roberto Ierusalimschy
36eb665859
no more refs, upvalues; lexical scoping;pseudo-indices
2001-10-31 16:06:05 -02:00
Roberto Ierusalimschy
070204300c
more consistent names for auxlib functions
2001-10-26 15:33:30 -02:00
Roberto Ierusalimschy
21aa7e55f2
optimization for array part of a Table
2001-10-25 17:14:14 -02:00
Roberto Ierusalimschy
fffb6f3814
no more MINPOWER2
2001-10-25 17:13:33 -02:00
Roberto Ierusalimschy
0b551a24f8
Hash' -> Table'
2001-10-25 17:12:21 -02:00
Roberto Ierusalimschy
8069f77ca4
C++ warning
2001-10-17 19:17:45 -02:00
Roberto Ierusalimschy
1e81da51ba
new API for registry and C upvalues + new implementation for references
2001-10-17 19:12:57 -02:00
Roberto Ierusalimschy
7cd37142f4
details
2001-10-17 19:06:56 -02:00
Roberto Ierusalimschy
e7c2eebd87
new function `concat'
2001-10-16 15:41:43 -02:00
Roberto Ierusalimschy
0c3ea96541
no more copytagmethod function
2001-10-11 18:41:21 -03:00
Roberto Ierusalimschy
babaa96eab
URL in indentification
2001-10-11 18:40:56 -03:00
Roberto Ierusalimschy
15462edb0f
new definitions for closure structures
2001-10-02 13:45:03 -03:00
Roberto Ierusalimschy
6f936bc793
"compatibility module" no longer exists
2001-10-02 13:43:54 -03:00
Roberto Ierusalimschy
b840a7518d
details
2001-10-02 13:43:29 -03:00
Roberto Ierusalimschy
f54cdb33a5
small bug in close x return
2001-09-28 13:48:16 -03:00
Roberto Ierusalimschy
8e9b1e4ae9
details
2001-09-25 14:08:46 -03:00
Roberto Ierusalimschy
328d53e77b
restricted syntax for function call/table accesses prefixes
2001-09-25 14:06:48 -03:00
Roberto Ierusalimschy
c04d9b9ecb
small bug when closing closures in error conditions
2001-09-25 14:05:49 -03:00
Roberto Ierusalimschy
c44c68450a
changes by lhf
2001-09-24 12:54:36 -03:00
Roberto Ierusalimschy
abdbe883a8
first implementation of unrestricted static scoping
2001-09-07 14:39:10 -03:00
Roberto Ierusalimschy
4d0935ec0f
better definition for `luaM_freelem'
2001-09-07 14:30:16 -03:00
Roberto Ierusalimschy
e1d072571e
better syntax for type casts
2001-08-31 16:46:07 -03:00
Roberto Ierusalimschy
7651a5c6b2
start of new version
2001-08-31 16:46:07 -03:00
Roberto Ierusalimschy
8c8ad5f3ff
better locality of assignment of table values
2001-08-30 17:56:43 -03:00
Roberto Ierusalimschy
34a09b65f3
some changes of arguments from char to int
2001-08-30 17:55:58 -03:00
Roberto Ierusalimschy
29d883b9bd
avoid augmenting alignment of pointers
2001-08-30 17:55:22 -03:00
Roberto Ierusalimschy
b0d5bd8c70
tinsert gets 3d argument instead of last one
2001-08-30 17:54:51 -03:00
Roberto Ierusalimschy
9fca43f5b0
details
2001-08-30 17:54:36 -03:00
Roberto Ierusalimschy
33d820d41d
new syntax "= exp" to rpint exp + simplifications
2001-08-30 17:54:02 -03:00
Roberto Ierusalimschy
c3d72096c4
use a table to find (and reuse) constants when parsing
2001-08-27 12:16:28 -03:00
Roberto Ierusalimschy
7afc74ff07
avoid some warnings from strange compilers
2001-08-27 12:14:57 -03:00
Roberto Ierusalimschy
022bf27202
extra parenteses to avoid warnings
2001-08-27 12:13:59 -03:00
Roberto Ierusalimschy
fd40af92e4
the parser is not LL(1)
2001-08-10 17:53:03 -03:00
Roberto Ierusalimschy
0171543704
better optimization options
2001-07-24 19:40:08 -03:00
Roberto Ierusalimschy
ebd1d1f82c
no more deprecated code
2001-07-24 19:39:34 -03:00
Roberto Ierusalimschy
04320e04bf
warnings from Visual C++ (plus small details)
2001-07-24 18:57:19 -03:00
Roberto Ierusalimschy
5d2d2b1752
the usual stuff
2001-07-24 14:25:30 -03:00
Roberto Ierusalimschy
f34001faa9
details
2001-07-24 14:25:03 -03:00
Roberto Ierusalimschy
95988676d8
small bug when creating AsBc instructions in 16-bit machines
2001-07-24 14:19:07 -03:00
Roberto Ierusalimschy
767abdfdc0
`newtype' returns old tag when given an old name
2001-07-23 16:56:00 -03:00
Roberto Ierusalimschy
45b173cbf8
warnings/details
2001-07-21 21:59:36 -03:00
Roberto Ierusalimschy
a94cba4b88
ready for 4.1 alpha?
2001-07-19 10:36:18 -03:00
Roberto Ierusalimschy
f9f355221f
version -> 4.1 alpha
2001-07-19 10:24:18 -03:00
Roberto Ierusalimschy
b3dd9b1bb1
`format' can handle \0 in format string (why not?)
2001-07-17 15:46:49 -03:00
Roberto Ierusalimschy
d8f37bf42a
weakregistry has its keys weak, too
2001-07-17 14:54:46 -03:00
Roberto Ierusalimschy
a598804a04
small bug in luaK_self (side effects)
2001-07-17 11:30:44 -03:00
Roberto Ierusalimschy
6c8e652aa6
use macros for 'getc'
2001-07-16 17:24:48 -03:00
Roberto Ierusalimschy
9f25df02d5
new definition for headers of binary files
2001-07-12 16:34:03 -03:00
Roberto Ierusalimschy
ae1cf64348
better names for type-related functions
2001-07-12 15:11:58 -03:00
Roberto Ierusalimschy
a264fd089e
small bug in read_chars (fread x eof)
2001-07-12 11:59:14 -03:00
Roberto Ierusalimschy
a3d03ff6b6
bug: error message for `%a' gave wrong line number
2001-07-10 17:02:22 -03:00
Roberto Ierusalimschy
654b16e83a
better performance for table operations (mainly for integer indices)
2001-07-05 17:31:14 -03:00
Roberto Ierusalimschy
dc4e0ecdaf
new versions by lhf
2001-07-05 17:29:15 -03:00
Roberto Ierusalimschy
9924668931
LUA_MINSTACK has a fixed value
2001-07-05 16:32:42 -03:00
Roberto Ierusalimschy
89ef91a7fe
`opmodes' table also generated automatically by mkprint
2001-07-03 14:02:02 -03:00
Roberto Ierusalimschy
00aaee0ae7
details
2001-07-03 14:01:34 -03:00
Roberto Ierusalimschy
18d3e82cfe
check C is independent from check B
2001-07-03 14:01:34 -03:00
Roberto Ierusalimschy
2a4afb97c8
new module lopcodes.c for tables describing opcodes
2001-06-28 16:58:57 -03:00
Roberto Ierusalimschy
87a5fae453
tables describing opcodes
2001-06-28 16:58:57 -03:00
Roberto Ierusalimschy
afed6c6864
missing an opcode name
2001-06-28 12:06:20 -03:00
Roberto Ierusalimschy
770954510f
rename of kproto' to p'
2001-06-28 11:57:17 -03:00
Roberto Ierusalimschy
b346834a09
new macros for changing numbers
2001-06-28 11:48:44 -03:00
Roberto Ierusalimschy
61a036eaa5
new macro to control format for `read"*n"'
2001-06-28 11:45:44 -03:00
Roberto Ierusalimschy
37f3a1c045
too much optimization to "break" keys in tables; keep them as TObjects...
2001-06-26 10:20:45 -03:00
Roberto Ierusalimschy
9559c111a3
new read' option *u' (read-until) + simpler implementation for `read'
2001-06-22 10:49:42 -03:00
Roberto Ierusalimschy
777061e441
resurect userdata before calling its GC tag method
2001-06-21 13:41:34 -03:00
Roberto Ierusalimschy
fccadba4b5
new reserved words in' and global'
2001-06-20 18:07:57 -03:00
Roberto Ierusalimschy
b940f09984
no more "compat mode" with 3.2 (deprecated functions)
2001-06-20 14:25:30 -03:00
Roberto Ierusalimschy
878979cef7
no more opnames in binary tag methods
2001-06-20 14:22:46 -03:00
Roberto Ierusalimschy
8e586c13fc
cleaner way to ensure alignment for strings and userdata
2001-06-15 17:36:57 -03:00
Roberto Ierusalimschy
eadf2aaaff
small optimizations
2001-06-15 16:17:33 -03:00
Roberto Ierusalimschy
ae19b2f51e
more relaxed rules for syncronized access
2001-06-15 16:16:41 -03:00
Roberto Ierusalimschy
a3fbf5f5fd
details
2001-06-13 15:51:20 -03:00
Roberto Ierusalimschy
7fae1c17b1
detail
2001-06-13 11:25:49 -03:00
Roberto Ierusalimschy
89e8303f4e
more robust treatment of GC tag methods (now they can create new
...
objects while running...)
2001-06-12 15:43:13 -03:00
Roberto Ierusalimschy
89c301d180
`(exp)' adjusts exp to 1 result
2001-06-12 11:36:48 -03:00
Roberto Ierusalimschy
186111dc01
unused definition
2001-06-11 11:57:17 -03:00
Roberto Ierusalimschy
0a1b1acdd3
details about opcode parameters
2001-06-11 11:56:42 -03:00
Roberto Ierusalimschy
79acf5ea60
details
2001-06-08 16:20:02 -03:00
Roberto Ierusalimschy
cbc59592ff
new definition for luaD_call' and luaD_adjusttop'
2001-06-08 16:01:38 -03:00
Roberto Ierusalimschy
4905fdd135
C++ warning
2001-06-08 13:48:32 -03:00
Roberto Ierusalimschy
0267168675
details.
2001-06-08 09:29:27 -03:00
Roberto Ierusalimschy
ba11831d35
smaller structs for udata and for strings
2001-06-07 12:01:21 -03:00
Roberto Ierusalimschy
190ddd431d
details (rests of debug code)
2001-06-07 11:44:51 -03:00
Roberto Ierusalimschy
65c289b046
details
2001-06-07 10:46:29 -03:00
Roberto Ierusalimschy
d5b83ead90
new implementation for userdatas, without `keys'
2001-06-06 15:00:19 -03:00
Roberto Ierusalimschy
da673d31aa
user can define extra alignment requirements
2001-06-05 17:01:09 -03:00
Roberto Ierusalimschy
323da72577
weakmode' queries must have an explicit ?'
2001-06-05 16:41:31 -03:00
Roberto Ierusalimschy
943b8f5b18
details
2001-06-05 16:41:24 -03:00
Roberto Ierusalimschy
762d059a13
new implementation for the Virtual Machine
2001-06-05 15:17:01 -03:00
Roberto Ierusalimschy
572a69b6af
name changes
2001-04-23 13:35:45 -03:00
Roberto Ierusalimschy
beee01b170
re-implementation of refs through weak tables
2001-04-17 14:35:54 -03:00
Roberto Ierusalimschy
6473f965ca
new API functions to load (parse?) a chunk without running it.
2001-04-11 15:39:37 -03:00
Roberto Ierusalimschy
0e0e4a480e
first implementation for weak tables
2001-04-11 11:42:41 -03:00
Roberto Ierusalimschy
2a50188269
avoid use of l_char outside INTERNALs (use lua_char instead)
2001-04-06 18:17:37 -03:00
Roberto Ierusalimschy
9aedea6ec8
small bug (when parser fails, there is no function on the stack...)
2001-04-06 16:26:06 -03:00
Roberto Ierusalimschy
a68635a919
list constructors do not adjust last expression
2001-04-06 15:25:00 -03:00
Roberto Ierusalimschy
2112142680
allow syntax << function (x) ... end (...) >> as a statement
2001-04-05 13:49:14 -03:00
Roberto Ierusalimschy
dd3a63c205
new way to handle `profiles'
2001-03-26 11:31:49 -03:00
Roberto Ierusalimschy
cb49b088b6
old signature for lua_open
2001-03-09 15:05:05 -03:00
Roberto Ierusalimschy
c5a23cf01a
details
2001-03-07 15:16:22 -03:00
Roberto Ierusalimschy
6048c4f74d
better way to link callinfo's and stack
2001-03-07 15:09:25 -03:00
Roberto Ierusalimschy
5e870f86a2
optimization for tailcall does not seem to pay itself
2001-03-07 10:22:55 -03:00
Roberto Ierusalimschy
f81b8adb3f
string [[...]] ignores initial \n
2001-03-07 09:49:37 -03:00
Roberto Ierusalimschy
2b2267069b
new functions pack' and unpack'
2001-03-07 09:43:52 -03:00
Roberto Ierusalimschy
72d3d155b0
detail
2001-03-07 09:27:06 -03:00
Roberto Ierusalimschy
6d4db86888
open functions are lua_Cfunctions
2001-03-06 17:09:38 -03:00
Roberto Ierusalimschy
e9a3820370
sizeof(string) != strlen(string)+1 when sizeof(char) != 1
2001-03-06 11:46:54 -03:00
Roberto Ierusalimschy
9e8a46daa2
details (identation)
2001-03-02 14:40:08 -03:00
Roberto Ierusalimschy
7b84f9e65c
lower-case for macros with arguments
2001-03-02 14:27:50 -03:00
Roberto Ierusalimschy
1e40b4dc61
buffer should be void *, as char now is not that neutral...
...
+ little bug in pointer arithmetic
2001-02-23 17:32:32 -03:00
Roberto Ierusalimschy
dfd7ce74cf
buffer should be void *, as char now is not that neutral...
2001-02-23 17:32:16 -03:00
Roberto Ierusalimschy
8399df5dcf
detail
2001-02-23 17:31:37 -03:00
Roberto Ierusalimschy
d2a64bb6d4
`llimits' may need definitions from LUA_USER_H
2001-02-23 17:28:56 -03:00
Roberto Ierusalimschy
a90f06dcd8
`atoi' does not have a wide-char equivalent
2001-02-23 17:28:26 -03:00
Roberto Ierusalimschy
35023355f2
details for wchar
2001-02-23 14:28:12 -03:00
Roberto Ierusalimschy
39b7978329
first (big) step to support wide chars
2001-02-23 14:17:25 -03:00
Roberto Ierusalimschy
d164e2294f
_ERRORMESSAGE called through get global tag method
2001-02-23 10:38:56 -03:00
Roberto Ierusalimschy
2cc94ac81b
avoid name clash with `sys/stat'
2001-02-23 10:38:56 -03:00
Roberto Ierusalimschy
5f37134e64
avoid '...' and "..." inside comments
2001-02-22 15:59:59 -03:00
Roberto Ierusalimschy
52ee91dd73
better encapsulation of some types
2001-02-22 14:15:18 -03:00
Roberto Ierusalimschy
191fd35f0a
warnings from Visual C++
2001-02-21 13:52:09 -03:00
Roberto Ierusalimschy
d6978d03e1
small bug in testing (pushuserdata needs some memory to work...)
2001-02-21 13:51:25 -03:00
Roberto Ierusalimschy
68b08848d4
`dostring' now is safe to run binary code.
2001-02-20 15:29:54 -03:00
Roberto Ierusalimschy
888f91fa24
code check for upvalues
2001-02-20 15:28:11 -03:00
Roberto Ierusalimschy
c1db0b2bf1
detail
2001-02-20 15:18:00 -03:00
Roberto Ierusalimschy
099442c41f
better separation between basic types
2001-02-20 15:15:33 -03:00
Roberto Ierusalimschy
27600fe87a
better strucuture for code checker
2001-02-16 15:58:27 -02:00
Roberto Ierusalimschy
f8509668dc
details.
2001-02-14 15:38:45 -02:00
Roberto Ierusalimschy
40f4e931f3
more liberal syntax for expressions
2001-02-14 15:19:28 -02:00
Roberto Ierusalimschy
29371ecfe8
better way to handle multi-line input (with concat)
2001-02-14 15:19:01 -02:00
Roberto Ierusalimschy
5d9b8b7cdc
more secure definition for lua_concat
2001-02-14 15:04:11 -02:00
Roberto Ierusalimschy
1c2501fad4
tests for string alignment
2001-02-13 14:52:01 -02:00
Roberto Ierusalimschy
a4ae1475e3
details (smaller code)
2001-02-13 14:17:53 -02:00
Roberto Ierusalimschy
b3da4ee907
checking consistency of jumps.
2001-02-12 17:54:50 -02:00
Roberto Ierusalimschy
3c649ce123
checking consistency of jumps (and some other details)
2001-02-12 17:54:28 -02:00
Roberto Ierusalimschy
95da574dbc
some compilers (wrongly) complain about that
2001-02-12 17:21:19 -02:00
Roberto Ierusalimschy
255052b6c6
better API checks
2001-02-12 13:42:44 -02:00
Roberto Ierusalimschy
1bdc156b52
details
2001-02-12 11:04:19 -02:00
Roberto Ierusalimschy
03d8a9bf0d
details
2001-02-09 18:29:33 -02:00
Roberto Ierusalimschy
d2e340f467
string pointers are always fully aligned
2001-02-09 18:22:29 -02:00
Roberto Ierusalimschy
6875fdc8be
new semantics for pushuserdata (no more different userdatas with same value)
2001-02-09 17:53:16 -02:00
Roberto Ierusalimschy
dc17a9cc24
new semantics for pushuserdata
2001-02-09 17:52:54 -02:00
Roberto Ierusalimschy
81e63f75c0
`tostring' uses type names (when available)
2001-02-09 17:52:24 -02:00
Roberto Ierusalimschy
c81404cae5
first version of code verification
2001-02-09 16:37:33 -02:00
Roberto Ierusalimschy
b6ce590433
details
2001-02-09 16:07:47 -02:00
Roberto Ierusalimschy
e70e6a3b7a
<read(0)> tests for EOF
2001-02-09 14:25:50 -02:00
Roberto Ierusalimschy
6548bf7462
warnings from Visual C
2001-02-08 09:19:10 -02:00
Roberto Ierusalimschy
7178a5e34a
new way to handle top x L->top
2001-02-07 16:13:49 -02:00
Roberto Ierusalimschy
322b7b5fc5
easier to add new initialization functions
2001-02-06 16:18:58 -02:00
Roberto Ierusalimschy
1f917e709c
better use of extra include files (both for tests and for old_ansi)
2001-02-06 14:01:29 -02:00
Roberto Ierusalimschy
d444153dbe
ESC (which starts precompiled code) in C is \33, not \27
2001-02-06 11:59:29 -02:00
Roberto Ierusalimschy
a894499566
details
2001-02-05 17:08:01 -02:00
Roberto Ierusalimschy
d1fc6244f0
extended syntax to allow function a.b.c (x)
2001-02-05 15:48:52 -02:00
Roberto Ierusalimschy
7e3d3e1f70
details
2001-02-02 17:02:40 -02:00
Roberto Ierusalimschy
1f9e3731d1
back to the basics (well-behaved variant record...)
2001-02-02 14:32:00 -02:00
Roberto Ierusalimschy
42224ca553
loop of 'dostring' may never reclaim memory
2001-02-02 14:23:20 -02:00
Roberto Ierusalimschy
426d3e43bd
lock/unlock may use L + better structure for internal debug stuff
2001-02-02 13:13:05 -02:00
Roberto Ierusalimschy
8823f371a2
new header to put together debug-related declarations
2001-02-02 13:12:25 -02:00
Roberto Ierusalimschy
e506b864cd
no need for tags in boxed values :-(
2001-02-01 15:40:48 -02:00
Roberto Ierusalimschy
9a231afa97
top must be updated when there is any error
2001-02-01 15:39:55 -02:00
Roberto Ierusalimschy
4ab6acacdf
better control of relationship top x L->top
2001-02-01 14:03:38 -02:00
Roberto Ierusalimschy
6858763994
bug in lua_pushuserdata(L, NULL)
2001-02-01 11:56:49 -02:00
Roberto Ierusalimschy
b68fb7f62e
`assert' returns its first argument
2001-01-31 17:53:01 -02:00
Roberto Ierusalimschy
60ff79451c
detail in error message
2001-01-31 11:13:17 -02:00
Roberto Ierusalimschy
44a53df688
better to avoid dirty tricks
2001-01-30 17:48:37 -02:00
Roberto Ierusalimschy
63a822c8e1
all boxed types start with their tags
2001-01-29 17:34:02 -02:00
Roberto Ierusalimschy
09def5da44
small corrections
2001-01-29 17:33:55 -02:00
Roberto Ierusalimschy
6b71a9cfe5
smaller tables for machines with 8-bit alignment
2001-01-29 15:17:26 -02:00
Roberto Ierusalimschy
fa8c44b510
avoid the use of "reopen" (not that standard)
2001-01-29 13:35:17 -02:00
Roberto Ierusalimschy
3b6f8bfbe6
simpler implementation of for loops
2001-01-29 13:26:40 -02:00
Roberto Ierusalimschy
caf01b5bfa
better implementation for list "for"
2001-01-29 11:14:49 -02:00
Roberto Ierusalimschy
ca1f28b829
avoid side-effects on macros that may use twice their arguments
2001-01-26 16:43:22 -02:00
Roberto Ierusalimschy
b82242d4c4
detail
2001-01-26 13:58:50 -02:00
Roberto Ierusalimschy
ac390020e9
optimizations based on all types but number and nil are pointers
2001-01-26 12:16:35 -02:00
Roberto Ierusalimschy
9b45439860
details
2001-01-26 12:16:24 -02:00
Roberto Ierusalimschy
7959f3aebb
easier way to erase 'dead' keys
2001-01-26 11:18:00 -02:00
Roberto Ierusalimschy
bce6572579
new macros + new names to facilitate compilation of threaded version
2001-01-26 09:45:51 -02:00
Roberto Ierusalimschy
a53d9b66ca
first implementation for type names
2001-01-25 14:45:36 -02:00
Roberto Ierusalimschy
c8559e3c8d
a small optimization
2001-01-24 14:20:54 -02:00
Roberto Ierusalimschy
71ae4801d6
macros LUA_ENTRY/LUA_EXIT to control exclusive access to Lua core
2001-01-24 13:45:33 -02:00
Roberto Ierusalimschy
6fda6a5302
support for multiple stacks sharing the same global environment
2001-01-22 16:01:38 -02:00
Roberto Ierusalimschy
4ac58853dc
thead-specific state separated from "global" state
2001-01-19 11:20:30 -02:00
Roberto Ierusalimschy
f2c451d745
all accesses to TObjects done through macros
2001-01-18 13:59:09 -02:00
Roberto Ierusalimschy
619edfd9e4
details
2001-01-15 16:07:56 -02:00
Roberto Ierusalimschy
a04de4f0ad
no more END opcode
2001-01-15 14:13:24 -02:00
Roberto Ierusalimschy
a653d93a43
string comparison only needs to test for "less than"
2001-01-11 16:59:32 -02:00
Roberto Ierusalimschy
321c7fb6f8
details
2001-01-11 16:59:20 -02:00
Roberto Ierusalimschy
dabb19fc17
specialized versions for luaH_set (numbers and strings)
2001-01-10 16:56:11 -02:00
Roberto Ierusalimschy
08496eea8b
small changes in lstring
2001-01-10 15:41:50 -02:00
Roberto Ierusalimschy
4ff5545709
new macro pushliteral
2001-01-10 14:58:11 -02:00
Roberto Ierusalimschy
595e449537
tighter size for error buffers
2001-01-10 14:40:56 -02:00
Roberto Ierusalimschy
a907aeeb1e
general corrections
2000-12-28 15:25:45 -02:00
Roberto Ierusalimschy
76f62fc5a1
correct size only after malloc success
2000-12-28 10:59:41 -02:00
Roberto Ierusalimschy
0183b8030c
`free' gets size of the block: complete control over memory use
2000-12-28 10:55:41 -02:00
Roberto Ierusalimschy
8c49e19865
explicit control of size for growing vectors
2000-12-26 16:46:09 -02:00
Roberto Ierusalimschy
6af005ec20
bug: when `read' fails it must return nil (and not no value)
2000-12-22 15:32:28 -02:00
Roberto Ierusalimschy
f8a0fd268e
temporary version
2000-12-22 14:58:41 -02:00
Roberto Ierusalimschy
0066bbbb0b
details
2000-12-22 14:57:46 -02:00
Roberto Ierusalimschy
1db05793a0
time' does not need to correct its table argument (use date' for that)
2000-12-22 14:57:13 -02:00
Roberto Ierusalimschy
af97be026b
new function for time and date
2000-12-18 11:42:19 -02:00
Roberto Ierusalimschy
cce8ebd306
obsolete `format' option (d$).
2000-12-18 11:41:41 -02:00
Roberto Ierusalimschy
4894c27962
lua_Number defined in lua.h (1st version)
2000-12-04 16:33:40 -02:00
Roberto Ierusalimschy
10ac68c648
first implementation for position captures
2000-12-04 12:43:06 -02:00
Roberto Ierusalimschy
01b00cc292
better control over extensions of char/short to int
2000-11-30 16:50:47 -02:00
Roberto Ierusalimschy
fc7b167ae0
BUG: parser does not accept a ;' after a return'
2000-11-29 09:57:42 -02:00
Roberto Ierusalimschy
96253ed8ce
better support for 64-bit machines (avoid excessive use of longs)
2000-11-24 15:39:56 -02:00
Roberto Ierusalimschy
35d6b15057
some cleaning
2000-11-23 11:49:35 -02:00
Roberto Ierusalimschy
22914afab3
avoid the use of (non const) static data
2000-11-23 11:47:39 -02:00