[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: conditional compilation of debug facilities in LUA core
- From: Benoit Germain <bgermain@...>
- Date: Fri, 6 Sep 2002 17:10:24 +0200
Hi all (well, game developers might be more specifically concerned, I think)
I was thinking that when using LUA as a scripting extension for a game, once
the scripts are debugged they will not change, because the scripting engine
won't be exposed to the player (unless you use LUA as a console language).
In that case, all the debug stuff is no longer necessary, as well as the
hook mechanism. Therefore, in order to make LUA leaner and faster, it might
be interesting to be able to compile the core with all this being disabled.
Of course the setjmp/longjmp mechanism should remain, but testing for a
count hook at each VM instruction, and keeping lua_Debug structure pointers
in some places is something I would want to be able to control, for example
by commenting out a -DLUA_REFLEXIVEDEBUG directive in the config file...
I guess this shouldn't be too much work for anybody, but if this could
become a feature of the official lua distribution, it would spare many of us
the throes of despair at not having found all the places to touch, and of
doing all this all over again when upgrading.
I suppose that it would mean that the associated compiler would be unable to
generate unstripped bytecode files, and that a virtual machine without debug
facilities would have to fail gracefully upon being handled a precompiled
file with debug infos (even if crashing would'nt bother me too much).
Anybody with me to convince the authors to include this feature in 5.0 final
:-) ?
Cheers,
Benoit.