diff options
author | Tom Hacohen <tom@stosb.com> | 2016-08-24 15:59:28 +0100 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2016-09-05 16:03:17 +0100 |
commit | 4aae224ef5af35e920e0c5a2c23df9afbb33bb84 (patch) | |
tree | e91b61073eb949b9d654ba5ed6fb6fcb0ea86e5a /src/tests/eo/access/access_simple.c | |
parent | c8c0bbcfcfd33907e6f8edc253f094d89bd320c5 (diff) | |
download | efl-4aae224ef5af35e920e0c5a2c23df9afbb33bb84.tar.gz |
Efl object: change the way we set class's functions.
This is another follow up to the investigations of T4227. As stated
there, in any PIE (a shared library is one), structures, even const ones
end up being written to because of dynamic relocation. This means that
using static const structures has actually lead to no savings, only
waste. Since we never really needed them, using them made things even
worse than just having a different API that doesn't save them.
Thus, this commit changes the way we set the functions. Instead of
passing a pre-populated struct, we now just have an initialiser function
where you set the functions. This on its own doesn't significantly reduce
the amount of dirty memory pages for a reason I have yet to uncover,
though I believe it's done as a misguided compiler optimisation.
However, this design is flexible enough so we can change to another one
that is quite ugly, but I have already tested and proven that does that.
This patch series doesn't include the better improvement (passing
everything on the stack as va_args) because the API was too ugly
for me to bear, and I would rather first make sure there is no way to
force the compiler to do the right thing here.
Unfortunately this commit gives up on useless stricter validation.
Before this commit we would make sure that we are only overriding
functions correctly defined in our hierarchy. With this one, we don't
anymore. This is not a big problem though because this is a check that
is also enforced by Eolian. So as long as you are using Eolian, you
should be fine.
Breaks API and ABI!
@feature
Diffstat (limited to 'src/tests/eo/access/access_simple.c')
0 files changed, 0 insertions, 0 deletions