Commit Graph

35 Commits

Author SHA1 Message Date
Marcel Hollerbach 46885653bc eo: remove class functions from eo
As in the previous commit explained, we want to get rid of class
functions in eo, and make them just c functions right away.

This commit removes the class parameter from the eo_class_function_set
call, and adjusts the tests to not depend on class functions anymore.
Class functions are now not tested anymore, tests that used them as a
way to test *things* are adjusted to test them now with object
functions, tests that just tested the working of class functions are
dropped.

This fixes T7675.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7902
2019-02-13 16:59:59 +01:00
Marcel Hollerbach 0709bdea6f eo: change API call of efl_class_functions_set
The next commit will bring support for something like reflection. This
commit prepares the whole tree for getting another argument in
efl_class_functions_set.

ref T7681

Differential Revision: https://phab.enlightenment.org/D7882
2019-02-07 14:43:25 +01:00
Mike Blumenkrantz 624925fe6e tests: move to using checked fixtures for all test suites
individual tests should not need to explicitly call init/shutdown functions
in most cases, and many did not properly do this anyway

see followup commit which resolves some issues with eina tests

ref T6813
ref T6811

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:26 +02:00
Mike Blumenkrantz adc601aca2 tests: add instrumentation to existing tests to find slow tests
efl_check.h must be included and the EFL_START/END_TEST macros must be
used in place of normal START/END_TEST macros

timing is enabled when TIMING_ENABLED is set
https://phab.enlightenment.org/w/improve_tests/

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:25 +02:00
Tom Hacohen 7ebf9d879d Eo: Change the way functions are registered to classes
This change lets us remove a field from the structure that leads to
around 20KiB more of saving in private dirty pages in elementary.

This also looks a bit better and feels a bit cleaner.

Breaks API and ABI.
2016-09-09 11:14:35 +01:00
Tom Hacohen bd3801247e Eo: Make function overrides implicit.
Before this commit, function overrides were explicit. That is, you'd
have to explicitly state you were overriding a function instead of
creating a new one. This made the code a tad more complex, and was also
a bit more annoying to use. This commit removes this extra piece of
information.

This means we now store much less information per function, that will
let us further optimise out structures in the future.
2016-09-08 13:59:04 +01:00
Tom Hacohen a8ccb191c6 Adjust the EFL to the Eo class_initilizer changes. 2016-09-05 16:03:17 +01:00
Tom Hacohen e0a95a96c9 Efl object: Simplify test that was unneededly prone to breaking 2016-09-05 16:00:07 +01:00
Tom Hacohen a6f126af12 Efl object: Don't pass events to eo class creation.
This was never used and there is no plan to ever use it. I'm going to
soon add a different mechanism with which it will be possible to provide
them again to Eo if ever needed without breaking ABI. Though it's
unlikely it will ever be.
2016-08-23 14:47:28 +01:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Tom Hacohen c450efdcde Eo: Improve error message when overriding functions. 2016-05-20 10:25:00 +01:00
Tom Hacohen e1efe2e651 Eo: Reorganise the vtable in classes and add pointer from objects.
This is the first step towards supporting eo_override().
More details about eo_override() to follow.
2016-05-20 10:25:00 +01:00
Vincent Torri d525034ec8 Test rework #17: Eo
I've only touched the suite/ subdir. Maybe we should merege the others into
the test suite in suite/
2016-02-16 12:41:06 +00:00
Tom Hacohen fd61ff69b3 Eo: Fix Eo on Windows.
We use function names instead of function pointers of Windows, because
of dll import/export issues (more in a comment in eo.c). Before this
commit we were comparing the pointers to the strings instead of the
content in some of the places, which caused op desc lookup not to work.
This fixes that.

Thanks to vtorri for his assistance.

@fix
2015-10-09 12:18:30 +01:00
Tom Hacohen e2344b9b9e Eo: reduce memory usage across applications.
As described by Carsten in his email to edev ML titled:
"[E-devel] eo stability - i think we need to postpone that"
with the switch to Eo2 we significantly increased our usage of RW memory
pages, and thus significantly increased our memory usage when running
multiple applications.

The problem was that during the migration to Eo2 the op id cache and the
op description arrays were merged, causing the op description arrays to
no longer be RO. This patch enables users of Eo (mainly Eolian) to
declare those arrays as const (RO) again, saving that memory.

There might be performance implications with this patch. I had to remove
the op desc array sorting, and I used a hash table for the lookup. I
think the op desc sorting doesn't really affect performance because that
array is seldom accessed and is usually pretty short. The hash table
is not a problem either, because it's  behind the scenes, so it can be
changed to a more efficient data structure if the hash table is not good
enough. The hash table itself is also rarely accessed, so it's mostly
about memory.

Please keep an eye for any bugs, performance or excessive memory usage.
I believe this should be better on all fronts.

This commit *BREAKS ABI*.

@fix
2015-09-28 18:39:15 +01:00
Tom Hacohen 9328524da4 Eo: Remove EO_SENTINEL.
This was never really needed because we always had the count.
Removing this now because we are already breaking API and ABI.
2015-09-28 15:52:50 +01:00
Tom Hacohen 37f84b7e96 Eo: Drop doc field from ops and events.
This hasn't been used for a while. Since we are going to break Eo a bit anyway
it's a good opportunity to drop this.

This may cause a slight performance issues with legacy events, such as
smart callbacks. This shouldn't really be a problem as we've migrated away from
them. If it does, we need to migrate the remaining parts. Only relevant
for callbacks that are added before the classes are created, which
shouldn't be possible except for smart, only for old evas callbacks.
2015-09-28 15:09:16 +01:00
Tom Hacohen ca6e6c93f5 Eo2: Adjust test suite to recent changes. 2014-04-10 04:20:21 +01:00
Tom Hacohen 92cc33c46f Eo: EO_BASE_CLASS->EO_CLASS. 2014-04-10 04:20:21 +01:00
Tom Hacohen c32bb4fe95 Eo2: Updated naming Eo2->Eo. 2014-04-10 04:20:21 +01:00
Jérémy Zurcher 64aa007caf eo2: update class creation tests, follow new error policy
see previous commit
2014-04-10 04:20:21 +01:00
Jérémy Zurcher d23b9ffd23 eo2: tests: extract mgs checks into eo_error_msgs.c|h 2014-04-10 04:20:20 +01:00
Jérémy Zurcher 5dc95bb50c eo2: add test cases for class construction errors
it covers: NULL API func, overriding non-existing fct,
API redefined, dich func override.
2014-04-10 04:20:20 +01:00
Tom Hacohen c20c537528 eo2: use EO2_CLASS_DESCRIPTION_NOOPS everywhere. 2014-04-10 04:20:19 +01:00
Tom Hacohen 08b28211b6 eo2: migrated the eo-suite test to eo2. 2014-04-10 04:20:19 +01:00
Tom Hacohen 682c69764d Revert "eo: libs,test,benchmarks Eo_Class -> Eo"
This reverts commit 1714fe93f4.

We actually want this type, it makes things clearer.

Conflicts:
	src/tests/eo/function_overrides/function_overrides_inherit2.c
	src/tests/eo/function_overrides/function_overrides_simple.c
	src/tests/eo/suite/eo_test_class_simple.c
2013-09-27 16:40:32 +01:00
Tom Hacohen 2a82ff95e4 Eo: unify the class func and normal func prototypes.
Conflicts:
	src/lib/eo/eo.c
2013-09-27 14:01:47 +01:00
Jérémy Zurcher 1714fe93f4 eo: libs,test,benchmarks Eo_Class -> Eo
Conflicts:
	src/tests/eo/suite/eo_test_general.c
2013-09-27 14:01:46 +01:00
Jérémy Zurcher 4eb2fb0bb6 eo_class_new: pack mro at the end of _Eo_Class 2013-06-17 23:41:02 +02:00
Daniel Zaoui d29fc36e1b Eo: tests to check eo ptrs indirection feature.
The test doesn't fail if the feature is disabled.
2013-04-23 09:50:40 +03:00
Daniel Willmann fe8db5a2d1 eo: Update tests to check for the correct error strings
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-04-09 14:13:47 +01:00
Tom Hacohen 7ccdb921ad Eo tests: when comparing logs, ignore anything below warnings.
Comparing all the debug messages is kinda crazy, so we just don't bother.
2013-03-01 12:08:19 +00:00
Tom Hacohen f9cf5bb374 Eo tests: Beginning of test output cleanup.
SVN revision: 83635
2013-02-05 14:37:28 +00:00
Vincent Torri 3b5a3448b7 merge: add eo
SVN revision: 77072
2012-09-26 06:56:52 +00:00