[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Large number bytecode weirdness on different platforms
- From: Chris <coderight@...>
- Date: Mon, 29 Jan 2007 16:16:20 -0500
I have this simple test.lua file:
if num < 0x100000000 then end
if num < 0x1000000000 then end
Using vanilla source Lua 5.1.1:
On Ubuntu Linux:
luac -o test.linux test.lua
On Windows:
luac.exe -o test.win test.lua
$ ls -l
-rw-r--r-- 1 user user 143 2007-01-29 15:46 test.linux
-rw------- 1 user user 134 2007-01-29 15:48 test.win
Notice the size difference. The bytecode is very different when I
compare it. What's happening?
The weird thing is, if you remove one of the "if" statements they
compile the same. You have to have both of them in there. Also, both
numbers must be greater than 32-bit but not all combinations produce
different bytecode.
CR