[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: error in luac 4.1 work 4
- From: "Zimmermann, Maik" <Zimmermann@...>
- Date: Thu, 14 Mar 2002 18:15:35 +0100
Hi,
I recently updated an project to lua version 4.1 w4 and got some troubble
with precompiled code.
Here is a simple example
if nil ~= 1 then
print("hello")
end
If this is run from source it prints "hello", but if its run as precompiled
chunk I get
error: bad constant type (0) in `luac.out'
here is the listing from luac:
main <0:@test.lua> (7 instructions, 28 bytes at 002F3C78)
0 params, 2 stacks, 0 upvalues, 0 locals, 4 constants, 0 functions, 4 lines
1 [1] LOADK 0 1 ; 1
2 [1] TESTEQ 0 0 250 ; ? type=0
3 [1] JMP 0 3 ; to 7
4 [2] GETGLOBAL 0 2 ; "print"
5 [2] LOADK 1 3 ; "hallo"
6 [2] CALL 0 2 1
7 [3] RETURN 0 1 0
constants (4) for 002F3C78:
0 ? type=0
1 1
2 "print"
3 "hallo"
locals (0) for 002F3C78:
bye,
Maik