I'm sending this for review as this can have a performance impact (but hard to measure) and so I'd like some feedback :)
This is two patches combined into one (arcanist...). The first one is not necessary but I have always hated the spinlock in efl_super.
eo: Remove lock from efl_super [EXPERIMENTAL]
I've always really disliked this lock. If someone calls a non-eo
function by accident with efl_super() then you'll most likely end
up in a deadlock.
This adds the cur_klass pointer to the object itself, exploiting
the fact that we have 8 bytes of padding (on 64 bits, at least).
Also, this opens the door to efl_cast() which would be similar to
efl_super() except that only a dynamic cast is done, not a call
to the parent function.
make benchmark shows a performance improvement, surprisingly.
eo: Add new API efl_cast [EXPERIMENTAL]
This is similar to efl_super but the specified class is the one
we want to call the function on. This is similar to dynamic_cast<>
Note: both efl_super() and efl_cast() need documentation!