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
f812b38a66
eo2: do not allow ill formed class creation
...
eo_class_new() returns NULL on error in _eo2_class_funcs_set().
it covers: NULL API func, API redefined, dich func override,
overriding non-existing fct.
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
70fe1398fd
eo2: if _eo2_class_funcs_set() fails eo_class_new() returns NULL
...
call to _eo2_class_funcs_set() is moved out of _eo_class_constructor()
into eo_class_new().
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
2fb5a54610
eo2: add tests for method call error msgs
2014-04-10 04:20:20 +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
a0d761cfa9
eo2: _eo2_call_resolve() fails if op is EO_NOOP
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
Jérémy Zurcher
9d2eeb7a8b
eo2: improve _eo2_class_funcs_set() errors support
...
as op descs are sorted, we can't output fct indexes in error msgs, but
as they are sorted using api_fct as key, we can detect multiple usage of
the same api_fct which leads to an unpredictable call to whatever is
returned by _eo2_api_op_id_get()->_eo2_api_desc_get().
it is still possible to instanciate an object of a not well defined class.
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
a9c325c124
eo2: normalize ERR msgs
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
c506ce2e1f
eo2: fix err msg in _dich_func_set()
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
82af591b83
eo2: improve _eo_op_id_name_get() to support eo1/2
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
19245b48f8
eo2: add _eo2_op_id_desc_get()
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
e41f2804b4
eo2: improve err msg in _eo2_api_op_id_get() and _eo2_call_resolve()
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
914dde776f
eo2: fix uninitialized vars in tests
...
because of conditional execution of eo2_do() fct calls
these vars could end up not initialized.
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
63c271dc5e
eo2: fix indentation
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
d3cd7cd63c
eo2: do not try to unref classes in eo2_do_end()
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
56ae6cf32e
eo2: remove memset() in _eo2_do_end() as all stack fields are set in _eo2_do_start()
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
adb5b8776d
eo2: no need to resolve eo_id when we reuse previous stack frame
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
d497459f93
eo2: add tests for call stack grow and shrink
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
ae536bdd84
eo2: call stack grows and shrinks
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
5f311223ad
eo2: rename Eo_Abstract_Class->Eo2_Abstract_Class
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
1834e3ff12
eo2: remove dead code
2014-04-10 04:20:20 +01:00
Jérémy Zurcher
117aa6f2a7
eo2: add TODO-eo2
...
merry XMas eo2 !!
you've been fully rebased,
without the eo2test directory,
luckily without any mistake !?
2014-04-10 04:20:20 +01:00
Tom Hacohen
055dd3c521
eo2: change the order of EO2_OP_FUNC* to put EAPI first.
...
This looks cleaner and more aligned. Also, it makes more sense as the
internal function is bound to the EAPI and not the other way around.
2014-04-10 04:20:20 +01:00
Tom Hacohen
0dc70153e5
eo2: optimize eo2_do_super func relove a bit.
...
no need to call dich_func_get twice, just reuse the value previously
fetched.
2014-04-10 04:20:20 +01:00
Tom Hacohen
08aca96bc3
eo2: get rid of eo2_stack_depth_get.
...
This is super internal, no reason why it should be exposed.
We should just implement automatic stack growth.
2014-04-10 04:20:20 +01:00
Tom Hacohen
76dc0d99a6
eo2: formatting.
2014-04-10 04:20:19 +01:00
Tom Hacohen
2fe10219c0
eo2: prefixed internal functions with _.
...
This is done to prevent code completion from picking them up.
2014-04-10 04:20:19 +01:00
Tom Hacohen
ebae305a9e
eo2: fixed validity checks for eo2_do_super.
...
The class should be checked to be valid and non-null.
This fixes the issues with eo_suite.
2014-04-10 04:20:19 +01:00
Tom Hacohen
1890fdf27f
eo2: fixed eo2_do call order.
...
This fixes the mixin test and general calling order.
"Next class" can only be known per op. That's why super should be
restricted to only one op.
2014-04-10 04:20:19 +01:00
Tom Hacohen
7c3f7e9b5b
eo2: eo2_do_super should only have one func.
...
This is a limitation that must be respected as eo2_do_super, unlike
eo2_do can end up with having different next class because of mixins.
2014-04-10 04:20:19 +01:00
Tom Hacohen
a62d150c96
eo2: share code between eo2_do and eo2_do_super.
2014-04-10 04:20:19 +01:00
Tom Hacohen
d9ceddf63a
eo2: fixed formatting.
2014-04-10 04:20:19 +01:00
Tom Hacohen
b8ae43b464
eo2: prefix all the eo2_*internal* functions with an underscore.
...
This prevents them from being auto-completed by IDEs which makes
development nicer.
2014-04-10 04:20:19 +01:00
Tom Hacohen
123ebca6d0
eo2: don't create types starting with __, that's reserved.
...
__ is a reserved compiler domain, prefix with _Eo2_ instead.
2014-04-10 04:20:19 +01:00
Tom Hacohen
c20c537528
eo2: use EO2_CLASS_DESCRIPTION_NOOPS everywhere.
2014-04-10 04:20:19 +01:00
Tom Hacohen
ed14382f7c
eo2: fixed a compliation issue in test suite.
2014-04-10 04:20:19 +01:00
Tom Hacohen
d0f71a6e8b
eo2: fix eo2_base_class function signatures.
...
"void func(void)" != "void func()" !
The former is a func that accepts 0 parameters.
The latter is a func that accepts variable number of parameters.
Watch out.
2014-04-10 04:20:19 +01:00
Tom Hacohen
7d79b10bb6
eo2 suite: add an important FIXME.
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
ff64050a7b
eo2: fixed eo2_class_class.
2014-04-10 04:20:19 +01:00
Tom Hacohen
f38895abed
eo2: detach children when object is deleted.
2014-04-10 04:20:19 +01:00
Tom Hacohen
a588c7d99e
eo2: correctly handle eo2_do(NULL, ...).
2014-04-10 04:20:19 +01:00
Jérémy Zurcher
b08ae598a8
eo2: do not restrict search for api in class extensions to some class types
2014-04-10 04:20:19 +01:00
Tom Hacohen
2593cb86c6
eo2: interface test, removed obsolete Eo_Op.
2014-04-10 04:20:19 +01:00
Tom Hacohen
f4f62e0f9f
eo2: migrated mixin test to eo2.
2014-04-10 04:20:19 +01:00
Tom Hacohen
e4f0e4c410
eo2: constructors test, removed obsolete Eo_Op.
2014-04-10 04:20:19 +01:00
Tom Hacohen
13b30abe56
eo2: cleaned up the function overrides test.
2014-04-10 04:20:19 +01:00
Tom Hacohen
3a524e4201
eo2: fix function overrides test.
2014-04-10 04:20:19 +01:00
Jérémy Zurcher
ca1f245366
eo2: _eo2_api_desc_get can look into interfaces extensions too
2014-04-10 04:20:19 +01:00