rzel / kahlua

Automatically exported from code.google.com/p/kahlua
0 stars 0 forks source link

when runing class.lua, nil error found #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. run the script in j2me emulator

What is the expected output? What do you see instead?
should print "900"

What version of the product are you using? On what operating system?
release 20081011

Please provide any additional information below.
run the script using offical 5.1 c lua vm can produce the right result

Original issue reported on code.google.com by tekken....@gmail.com on 14 Nov 2008 at 9:40

Attachments:

GoogleCodeExporter commented 8 years ago
I think the issue is that either self is not in the correct place on the object
stack, or the top of the object stack is pointing to the wrong place.  I did a 
little
debugging and found that the table that self references is there but at 
location 10
while the interpreter is trying to find it at location 4 or something (i don't
remember the exact locations).

Original comment by KevinRLu...@gmail.com on 16 Nov 2008 at 8:24

GoogleCodeExporter commented 8 years ago
I can also confirm that this is a bug in the latest source.
I'll investigate it further.

Thanks for the bug report!

Original comment by kristofer.karlsson@gmail.com on 18 Nov 2008 at 8:27

GoogleCodeExporter commented 8 years ago
I have now commited a minimal test case that verifies this bug. The bug is that 
the
metaoperation __call does not add the caller as the first argument.

This will be fixed ASAP, within the next few days.

Original comment by kristofer.karlsson@gmail.com on 18 Nov 2008 at 12:12

GoogleCodeExporter commented 8 years ago
This is now fixed in the latest svn revision 108!

Original comment by kristofer.karlsson@gmail.com on 19 Nov 2008 at 2:17

GoogleCodeExporter commented 8 years ago

Original comment by kristofer.karlsson@gmail.com on 19 Nov 2008 at 3:51