First attempt at safe virtual overrides
commitcffeb0d4debed48c5ec7d0ec9cce993260b8b35f
authorMichal Kottman <michal.kottman@gmail.com>
Wed, 19 Dec 2012 11:53:37 +0000 (19 12:53 +0100)
committerMichal Kottman <michal.kottman@gmail.com>
Wed, 19 Dec 2012 11:53:37 +0000 (19 12:53 +0100)
tree974f1baddb7ddaf8a5528e4b3308719ff0a3d914
parent1eba882634c96a4694e2d44faf55bc9b508615d8
First attempt at safe virtual overrides

Virtual methods implemented in Lua are not called
until a flag is set in the bitset hasOverride in
the shell class. This bitfield is updated in the
__newindex by checking if the value is a function
and key is a name known at compile time.

The overhead at __newindex is lower lower than
actually checking for overrides at runtime, and
also possibly safer - no Lua calls are made (apart
from lua_gettop) when the override is not present.
common/lqt_common.cpp
common/lqt_common.hpp
generator/classes.lua
generator/qt_internal.lua
generator/virtuals.lua
test/virt_test.lua