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