1 Mar 07:05
Re: LuaJIT vs C++
Alex Davies <alex.mania <at> iinet.net.au>
2008-03-01 06:05:15 GMT
2008-03-01 06:05:15 GMT
Hey,
I run luajit under Delphi, which also cannot run setjmp/longjmp due to
finalizers. My approach was to compile it as C code, but replace uses of
LUAI_TRY with a function that calls Delphi_Try. (and define the LUAI_THROW
macro as one that simply raises a delphi exception). I never had any
problems with Jit, but I do not use or require coroutines. However error
handling works fine. You could try that?
Delphi_Try:
procedure Delphi_Try(L: TLua; var Status: Integer; F: FLuaProcCall; UD:
Pointer);
begin
try
func(L, UD);
except
if status = 0 then
status := -1;
end;
end;
(The function is a little bit different to that, as I have it that regular
delphi exceptions are converted in to lua errors);
----- Original Message -----
From: "Alexander Gladysh"
> Hi, list!
>
> We have an application, dynamically linked with Lua. Lua is compiled
(Continue reading)
Hoisting of checks for functions stored in tables is a lot more
involved. This requires alias analysis, which is still on my TODO
list.
RSS Feed