Roberto Ierusalimschy
2a235312f0
detail (removing spaces at end of lines)
8 years ago
Roberto Ierusalimschy
fc6b32bcaa
bug: Lua can generate wrong code in functions with too many constants
8 years ago
Roberto Ierusalimschy
6487fb11fc
all 'static' variables should be 'const'
9 years ago
Roberto Ierusalimschy
fbd8614bdb
comment (FALLTHROUGH)
9 years ago
Roberto Ierusalimschy
1f259be52a
'getcode' -> 'getinstruction'
9 years ago
Roberto Ierusalimschy
b12b635a90
more refactoring
9 years ago
Roberto Ierusalimschy
384d1b47b0
comments (*lots* of them) + asserts
9 years ago
Roberto Ierusalimschy
a01eba657e
reordering of some functions + 'code_label' renamed to 'code_loadbool'
9 years ago
Roberto Ierusalimschy
b7446ea88d
detail ('while' -> 'for') in 'luaK_patchclose'
9 years ago
Roberto Ierusalimschy
d103312661
details (typos in comments)
9 years ago
Roberto Ierusalimschy
82129b9266
use macro 'hasjumps' to test whether expression has jumps...
9 years ago
Roberto Ierusalimschy
a1935b9cba
error message ("too complex" -> "too many registers") + MAXREGS
changed to 255 (no reason not to use maximum allowed)
10 years ago
Roberto Ierusalimschy
e723c75c02
details (avoid 'lint' warnings)
10 years ago
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)
10 years ago
Roberto Ierusalimschy
2b83711fba
new macro 'nvalue' (to convert an object to a float when we know
object is a number)
10 years ago
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)
10 years ago
Roberto Ierusalimschy
5fbd40dbe5
'x//y' extended to floats
10 years ago
Roberto Ierusalimschy
28fdbcf393
added include for 'lprefix.h', for stuff that must be added before
any other header file
10 years ago
Roberto Ierusalimschy
4542fb9f78
comments (a few extra quotes around identifiers)
10 years ago
Roberto Ierusalimschy
4b526045fa
comment
10 years ago
Roberto Ierusalimschy
491103708e
'MAXSTACK' -> 'MAXREGS' and moved to 'lcode.c' (there is no reason
to change that constant...)
10 years ago
Roberto Ierusalimschy
bdf566a8a3
`name' in comments changed to 'name'
10 years ago
Roberto Ierusalimschy
42ff788e53
comments
11 years ago
Roberto Ierusalimschy
ffa43df3cd
'setnvalue' -> 'setfltvalue' (for consitency with 'fltvalue')
11 years ago
Roberto Ierusalimschy
e98ba351ce
n^-m gives float result (instead of error)
11 years ago
Roberto Ierusalimschy
f61ceee708
LUAI_FUNC is being used only in header files
11 years ago
Roberto Ierusalimschy
607be77ec8
some details to avoid warnings
11 years ago
Roberto Ierusalimschy
da4811238a
details (typos in comments)
11 years ago
Roberto Ierusalimschy
2aff75f58e
small bug (from revision 2.80): LUA_OP* constants are not from
enumeration 'Opcode' (they are integers)
11 years ago
Roberto Ierusalimschy
cd12410195
new macro 'cast_void'
11 years ago
Roberto Ierusalimschy
5ff1c18a71
back with 'L' for macros 'luai_num*', but now with a new macro
'luai_numinvalidop' to protect constant folding
11 years ago
Roberto Ierusalimschy
99ac4a260f
'constfolding' passes a proper Lua state to 'luaO_arith'
11 years ago
Roberto Ierusalimschy
fa7e77fd38
detail ('codearith' uses 'LUA_OP*' constants instead of 'OP_*')
11 years ago
Roberto Ierusalimschy
19ad78d713
C++ needs casts for arithmetic with enums
11 years ago
Roberto Ierusalimschy
86dd8bf3f5
no more 'L' in macros "luai_num*" (several places that use those macros
cannot throw errors anyway...)
11 years ago
Roberto Ierusalimschy
1ea2d20f74
first implementation of '<<', '>>', and '~' (bitwise not)
11 years ago
Roberto Ierusalimschy
f5133aa1a5
small change in handling of unary operations
11 years ago
Roberto Ierusalimschy
c0edab0f6d
first implementation of bitwise operators '&' (band), '|' (bor),
and '~' (bxor)
11 years ago
Roberto Ierusalimschy
a948054a19
new order for binary operations (grouping them by type of result)
11 years ago
Roberto Ierusalimschy
a8f8c7fd80
integer exponentiation with negative exponent is invalid
11 years ago
Roberto Ierusalimschy
8ef9e8460e
bug (GC can collect long identifier during parser) + change (using
a single constant table for all functions in a chunk)
11 years ago
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)
12 years ago
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
12 years ago
Roberto Ierusalimschy
1f2b82bf25
correct way to avoid compile-time errors in integer divisions
12 years ago
Roberto Ierusalimschy
67532d5a10
constant folding and API arithmetic with integers
12 years ago
Roberto Ierusalimschy
00744a2729
'luaO_arith' -> 'luaO_numarith'
12 years ago
Roberto Ierusalimschy
a2f5c28a80
new operation '//' (integer division)
12 years ago
Roberto Ierusalimschy
5951c79ae1
default increment for 'for' loop is an integer (1, not 1.0)
12 years ago
Roberto Ierusalimschy
1294b09d8e
first implementation of literal integers (no constant folding yet)
12 years ago
Roberto Ierusalimschy
7a543cfae6
12 years ago