7d514af0bc
bug (in work version): comparisons should not try to convert strings to numbers
Roberto Ierusalimschy
2014-04-02 13:54:20 -03:00
f61ceee708
LUAI_FUNC is being used only in header files
Roberto Ierusalimschy
2014-04-02 13:44:42 -03:00
5aeb57f11f
detail (error message for conversion from float to integer)
Roberto Ierusalimschy
2014-04-01 15:55:06 -03:00
493b3fdd65
added an 'api_check' for negative sizes in 'lua_checkstack'
Roberto Ierusalimschy
2014-04-01 15:51:23 -03:00
315c5bf7b7
bug: compiler could optimize away overflow check (+ changing indices from 'int' to 'lua_Integer')
Roberto Ierusalimschy
2014-04-01 15:50:34 -03:00
607be77ec8
some details to avoid warnings
Roberto Ierusalimschy
2014-04-01 11:39:55 -03:00
0d745ed04c
more precise estimation (GCestimate) for total bytes in use after a GC cycle
Roberto Ierusalimschy
2014-04-01 11:06:59 -03:00
3d1c6730da
detail ('1U' -> '1u', like other unsigned constants in the code)
Roberto Ierusalimschy
2014-03-31 16:18:24 -03:00
66b7b9b582
math.abs, math.max, and math.min work for integers, too.
Roberto Ierusalimschy
2014-03-31 16:00:52 -03:00
8ef9117924
fancier way to do sign extension
Roberto Ierusalimschy
2014-03-31 15:38:26 -03:00
ea69f17d98
macro 'tostring' is used only by 'luaV_concat'
Roberto Ierusalimschy
2014-03-31 15:37:52 -03:00
a39489194e
changing prefix of configurable macros from "lua_" to "l_"
Roberto Ierusalimschy
2014-03-13 17:07:18 -03:00
a3addae036
lua_gettable and similars return type of gotten value
Roberto Ierusalimschy
2014-03-12 17:57:40 -03:00
ad40bb1181
detail in string.rep: allow large repetitions of the empty string (no possibility of overflows)
Roberto Ierusalimschy
2014-03-12 15:09:06 -03:00
80fe8504f5
make all dumps/loads go trhough Load/DumpVector (so it is easier to adapt the code to correct endianess, if needed)
Roberto Ierusalimschy
2014-03-11 15:56:27 -03:00
e976384213
keep chunk's headers compatible at least up to LUAC_VERSION (to be able to detect correctly version mismatches)
Roberto Ierusalimschy
2014-03-11 15:05:46 -03:00
68f4ccdd00
make sure that LUAC_INT is a lua_Integer and that LUAC_NUM is a lua_Number
Roberto Ierusalimschy
2014-03-11 11:22:54 -03:00
342a936599
detail (breaking too long lines)
Roberto Ierusalimschy
2014-03-10 16:52:47 -03:00
901da539e5
no need to avoid negative ints in 'LoadInt'
Roberto Ierusalimschy
2014-03-10 16:50:19 -03:00
197e249433
"indent -kr -i2 -br -brf -nut" plus a few manual formating
Roberto Ierusalimschy
2014-03-10 14:56:32 -03:00
2aff75f58e
small bug (from revision 2.80): LUA_OP* constants are not from enumeration 'Opcode' (they are integers)
Roberto Ierusalimschy
2014-03-09 16:21:34 -03:00
cd12410195
new macro 'cast_void'
Roberto Ierusalimschy
2014-03-07 13:19:00 -03:00
c5bb3643ab
simpler code to read a line from a file (using 'getc' or, if present, 'getc_unlocked')
Roberto Ierusalimschy
2014-03-06 14:12:02 -03:00
5ff1c18a71
back with 'L' for macros 'luai_num*', but now with a new macro 'luai_numinvalidop' to protect constant folding
Roberto Ierusalimschy
2014-03-06 13:15:18 -03:00
99ac4a260f
'constfolding' passes a proper Lua state to 'luaO_arith'
Roberto Ierusalimschy
2014-03-06 10:58:28 -03:00
f69e0ade19
no need to store a full 'size_t' fo the size of (frequent) small strings
Roberto Ierusalimschy
2014-03-01 12:18:44 -03:00
99a1c06ea3
more regularity with vectors + sizeof computed by the macros themselves
Roberto Ierusalimschy
2014-02-28 13:13:01 -03:00
93e28031de
all chars used in binary dumps are unsigned ('lu_byte')
Roberto Ierusalimschy
2014-02-28 09:25:12 -03:00
de84b3fecb
store number of upvalues of main function in front of the dump, so that undump can create initial closure before reading its prototype
Roberto Ierusalimschy
2014-02-27 15:56:15 -03:00
054179c2ff
more explicit handling of headers for binary chunks
Roberto Ierusalimschy
2014-02-27 13:56:20 -03:00
986c11daa6
removal of weird construction in definition of LUA_STRFTIMEOPTIONS (two empty strings concatenated as in "" "")
Roberto Ierusalimschy
2014-02-26 12:55:58 -03:00
c6c41e85b2
more uniformity for defining system-dependent features
Roberto Ierusalimschy
2014-02-26 12:27:56 -03:00
3f78de256e
no need to keep threads in a different GC list, now that there is the 'twups' list
Roberto Ierusalimschy
2014-02-18 10:46:26 -03:00
d764cc5522
new list 'twups' to allow traversal of upvalues from dead threads (+ fixed some problems with cycles involving those upvalues)
Roberto Ierusalimschy
2014-02-18 10:39:37 -03:00
ffa96d988d
field 'op' renamed to 'open'
Roberto Ierusalimschy
2014-02-15 11:12:01 -02:00
6a24bd17a8
no more second result from 'collectgarbage"count"' (as Lua seldom will need lua_Number to be an integer)
Roberto Ierusalimschy
2014-02-14 14:45:38 -02:00
1cce3e6842
change in the way 'collectgarbage("step", size)' interprets 'size' (mimicking the way the GC itself behaves when Lua allocates 'size' Kbytes)
Roberto Ierusalimschy
2014-02-14 14:43:14 -02:00
0b04c561f5
new syntax for Unicode escape '\u{012F}'
Roberto Ierusalimschy
2014-02-14 13:23:51 -02:00
90b0ac6495
limit to 'gcstepmul' imposed by 'lua_gc' (+ some details in 'lgc.c')
Roberto Ierusalimschy
2014-02-13 15:25:20 -02:00
de3b1c9b53
better control for number of finalizers called at each GC cycle (increases progressively)
Roberto Ierusalimschy
2014-02-13 12:46:38 -02:00
733c58595b
no more local collection
Roberto Ierusalimschy
2014-02-13 10:11:34 -02:00
4a1ed6e6e5
new field '__name' in metatables to help better error messages
Roberto Ierusalimschy
2014-02-11 15:39:15 -02:00
ba3586cc90
keep a single list of objects to be finalized (with local and non-local objects), to ensure finalization order
Roberto Ierusalimschy
2014-02-11 10:18:12 -02:00
68df7c6279
added proper headers for a standard lib file
Roberto Ierusalimschy
2014-02-06 18:03:24 -02:00
19ad78d713
C++ needs casts for arithmetic with enums
Roberto Ierusalimschy
2014-02-06 17:55:55 -02:00
6ccf150039
new library: utf8
Roberto Ierusalimschy
2014-02-06 15:32:33 -02:00
4ea60463f5
UTF-8 encoding exported as format '%U' in 'lua_pushfstring'
Roberto Ierusalimschy
2014-02-06 13:59:24 -02:00
d438e1379d
insertion of ".0" in floats with integer values done by "luaL_tolstring", not by the core
Roberto Ierusalimschy
2014-02-05 17:14:53 -02:00
1721d09ac8
still accepts initial '=' for expressions, for compatibility with old versions (and old habits...)
Roberto Ierusalimschy
2014-02-05 12:22:55 -02:00
2f3da00e51
added support for UTF-8 escapes
Roberto Ierusalimschy
2014-02-04 16:57:34 -02:00
5a73e3ad9e
simpler way to create messages for errors in escape sequences
Roberto Ierusalimschy
2014-01-31 13:14:22 -02:00
86dd8bf3f5
no more 'L' in macros "luai_num*" (several places that use those macros cannot throw errors anyway...)
Roberto Ierusalimschy
2014-01-27 11:34:32 -02:00
cd848cab6b
first implementation for string.pack/unpackfloat + try not to assume that chars have 8 bits
Roberto Ierusalimschy
2014-01-08 16:34:34 -02:00
29256e8960
first implementation of string.packint/string.unpackint
Roberto Ierusalimschy
2014-01-05 12:05:58 -02:00
438c534ff4
'arg' arguments (previously called 'narg', 'nArg', 'numArg', etc.) renamed all to 'arg'
Roberto Ierusalimschy
2014-01-05 12:04:46 -02:00
1ea2d20f74
first implementation of '<<', '>>', and '~' (bitwise not)
Roberto Ierusalimschy
2013-12-30 18:47:58 -02:00
f5133aa1a5
small change in handling of unary operations
Roberto Ierusalimschy
2013-12-18 16:44:42 -02:00
c0edab0f6d
first implementation of bitwise operators '&' (band), '|' (bor), and '~' (bxor)
Roberto Ierusalimschy
2013-12-18 12:12:03 -02:00
a948054a19
new order for binary operations (grouping them by type of result)
Roberto Ierusalimschy
2013-12-16 17:06:52 -02:00
a8f8c7fd80
integer exponentiation with negative exponent is invalid
Roberto Ierusalimschy
2013-12-16 12:30:22 -02:00
1a19893d6f
new "calculator mode"; no need to add '=' to print expressions
Roberto Ierusalimschy
2013-12-16 12:27:17 -02:00
e34c35abcf
new bug: Resuming the running coroutine makes it unyieldable
Roberto Ierusalimschy
2013-11-08 16:23:16 -02:00
7a8eb83b4a
bug: attempting to resume the running coroutine makes it unyieldable
Roberto Ierusalimschy
2013-11-08 16:16:33 -02:00
ab5fa213b3
added patch for last bug
Roberto Ierusalimschy
2013-11-08 15:45:10 -02:00
39929384c6
new macro 'luai_userstateclose' (to test it is being called correctly)
Roberto Ierusalimschy
2013-11-08 15:36:05 -02:00
de7cf8e63a
bug: should call 'luai_userstateclose' only when 'luai_userstateopen' has been called before
Roberto Ierusalimschy
2013-11-08 15:34:22 -02:00