[Gambas-user] JIT problem

Benoît Minisini gambas at ...1...
Wed May 14 16:03:35 CEST 2014


Le 14/05/2014 15:54, Emil Lenngren a écrit :
> Can someone print a gambas disassembly of a gambas file (and source code)
> where this happens?
> gbc -v File.class
> will compile the file and print the disassembly if I remember correctly.
>

I think that the crash comes form the implementation of the new 
IsMissing() function.

When a function has optional parameters, it pushes on the stack one 64 
bits integer (just after arguments, local variables, and slots for 
control flow instructions), each bit set indicating that the paramater 
was not passed to the function. (Quick & dirty implementation, but I 
didn't find better without breaking too many things...)

As the interpreter always unwinds the stack up to the position it had 
when entering the function, this was not a problem. But for the JIT 
compiler it may be!

Regards,

-- 
Benoît Minisini




More information about the User mailing list