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
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
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
5fbd40dbe5
'x//y' extended to floats
2014-11-21 10:15:57 -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
4542fb9f78
comments (a few extra quotes around identifiers)
2014-10-30 16:53:28 -02:00
Roberto Ierusalimschy
4b526045fa
comment
2014-10-28 15:27:41 -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
bdf566a8a3
`name' in comments changed to 'name'
2014-10-25 09:50:46 -02:00
Roberto Ierusalimschy
42ff788e53
comments
2014-05-08 15:58:46 -03:00
Roberto Ierusalimschy
ffa43df3cd
'setnvalue' -> 'setfltvalue' (for consitency with 'fltvalue')
2014-04-29 15:14:16 -03:00
Roberto Ierusalimschy
e98ba351ce
n^-m gives float result (instead of error)
2014-04-27 11:41:11 -03:00
Roberto Ierusalimschy
f61ceee708
LUAI_FUNC is being used only in header files
2014-04-02 13:44:42 -03:00
Roberto Ierusalimschy
607be77ec8
some details to avoid warnings
2014-04-01 11:39:55 -03:00
Roberto Ierusalimschy
da4811238a
details (typos in comments)
2014-03-21 10:52:33 -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
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
19ad78d713
C++ needs casts for arithmetic with enums
2014-02-06 17:55:55 -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
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
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
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
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
1f2b82bf25
correct way to avoid compile-time errors in integer divisions
2013-05-06 14:22:16 -03:00
Roberto Ierusalimschy
67532d5a10
constant folding and API arithmetic with integers
2013-05-02 09:37:24 -03:00
Roberto Ierusalimschy
00744a2729
'luaO_arith' -> 'luaO_numarith'
2013-04-29 13:57:48 -03:00
Roberto Ierusalimschy
a2f5c28a80
new operation '//' (integer division)
2013-04-26 10:08:29 -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
1294b09d8e
first implementation of literal integers (no constant folding yet)
2013-04-16 15:46:28 -03:00
Roberto Ierusalimschy
7a543cfae6
2013-04-15 12:43:34 -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
53480f1163
details (remove of some extra spaces)
2012-08-14 15:12:34 -03:00
Roberto Ierusalimschy
ca458f1f52
'luaK_goiffalse' exported
2011-08-30 13:26:41 -03:00
Roberto Ierusalimschy
51471ba748
comments about use of 'luaH_set'
2011-08-15 16:41:58 -03:00
Roberto Ierusalimschy
5ab6d36d99
no more field 'L' in 'FuncState'
2011-07-27 15:07:37 -03:00
Roberto Ierusalimschy
32a12e2f3f
detail (cleaned whitespaces at end of lines)
2011-07-15 09:50:29 -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
d120ec29ca
bug in OP_SELF when method name goes to a register
2011-04-28 11:00:11 -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
427ee519db
new instruction OP_LOADKX (to replace OP_LOADK with extra argument)
2011-04-07 15:14:12 -03: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
026a7e92be
bug in some short-circuit optimizations
2011-01-31 12:28:41 -02:00