Tom Hacohen
1db137fa8c
eo2: fixed EO2_CLASS_FUNC_BODY and etc. functions.
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
4f73887b47
eo2: remove EO2_OP_FUNC_VIRTUAL
...
a pure virtual function is an EO2_OP_FUNC
with NULL as private function implementation pointer
2014-04-10 04:20:17 +01:00
Tom Hacohen
feb5a5dc9e
eo2: fix backslash alignment.
...
This is one of the reasons why I hate backslash alignments, you end up
fixing style when you should be working on code.
2014-04-10 04:20:17 +01:00
Tom Hacohen
ac2f6d0bf5
eo2: updated the access test to use eo2.
2014-04-10 04:20:17 +01:00
Tom Hacohen
5f45e57b89
eo2: revert "eo2_add accepts non-defauld constructors"
...
We want to have normal functions as non-default constructors, not va_arg
ones. What we should do is split the object creation to two parts again.
The creation, the constructing (changes using the macro) and the
verification/end part that checks the constructor has been called.
This reverts commit 2ff2ce1894f173b306a896bda595e1a7768c074d.
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
7be0748b34
eo2: implement class function support
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
28d66a9858
eo2: eo_del_internal use same logic as in eo_add_internal
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
e82c0f6bf7
eo2: fix indent
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
42ad23c5c8
eo2: eo2_add accepts non-defauld constructors
2014-04-10 04:20:17 +01:00
Jérémy Zurcher
2d5baec80c
eo2: call _eo2_class_funcs_set from _eo_class_constructor
2014-04-10 04:20:16 +01:00
Tom Hacohen
8307ed5aa8
eo2: cleaned up EO2_CLASS_DESCRIPTION_OPS and OP_DESC_SIZE (renamed).
2014-04-10 04:20:16 +01:00
Tom Hacohen
56f48ac817
eo2: fixed dbg_info_get function to accept the correct number of params.
2014-04-10 04:20:16 +01:00
Tom Hacohen
3ae5b846f7
eo2: cleaned up eo2_do macros.
...
cleaned up the cleanup attribute usage.
don't use objid more than once (it's a macro).
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
329d752c59
eo2: do not call eo2_do_end() if eo2_do_start() fail
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
b6991985ed
eo2: eo2_do() uses __attribute__ cleanup
...
to protect us against bad use of break, goto, return ... in eo2_do,
we use __attribute__((cleanup(eo2_do_end))) to ensure that eo2_do_end()
is called whatever.
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
adc1ac0c23
eo2: add eo2_call_stack_depth
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
eeff3e898c
eo2: EO2_CALL_STACK_SIZE -> EO2_CALL_STACK_DEPTH
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
1aa3b1536f
eo2: add virtual func support
2014-04-10 04:20:16 +01:00
Tom Hacohen
ca5221e0f9
eo2: compile eo2_base_class when compiling libeo.
2014-04-10 04:20:16 +01:00
Tom Hacohen
ec1e507465
eo2: explicitly put void as the arguments in a zero argument function (macro).
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
13b1d03def
eo2: _eo2_api_desc_get() searches the class hierarchy
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
5febcc9ff1
eo2: oops, forgot to init desc to NULL in eo2_api_op_id_get()
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
d61a31a645
eo2: can't detect return in a eo2_do macro, *sigh*
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
21b31a2f97
eo2: eo2_base_class uses eo2 stuff only, I hope
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
9c4731f606
eo2: eo2_api_op_id_get search in parent klasses too
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
1d9d0cee9c
eo2: EO2_OP_FUNC_OVERRIDE copy doc from overriden func
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
2edd305507
eo2: set eo2_constructor and eo2_destructor chaining
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
7621758c80
eo2: use EO2_VERSION
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
c17a30dfb9
eo2: add cur_klass in call Stack and eo2_do_super
...
in eo2_do_start(), reuse previous stack fetched pointers when possible
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
68fb3d4c03
eo2: improve func overriding
...
add klass_id parameter to eo2_get_op_id()
in op descriptions, allow NULL fct pointer for virtual,
and use EO2_OP_OVERRIDE to declare overriding.
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
58cb65b895
eo2: eo2_base_class, one step further
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
8b6b9532c5
eo2: Eo.h swallows eo2_base_class.h
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
6a16edc888
eo2: call stack Proof Of Concept
...
no grow/shrink or thread local storage
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
a645076979
eo2: eo2_base_class on it's way
2014-04-10 04:20:16 +01:00
Jérémy Zurcher
2490a1bef2
eo2: better op_descs integration
...
struct _Eo_Class_Description swallows
Eo2_Op_Description *descs2;
2014-04-10 04:20:15 +01:00
Jérémy Zurcher
8ef9e1c00d
eo2: use EO2 instead of EO in macro names
2014-04-10 04:20:15 +01:00
Jérémy Zurcher
6bb29b378b
eo2: add EO_FUNC_BODY_VOID and EO_FUNC_BODY_VOIDV macros
2014-04-10 04:20:15 +01:00
Jérémy Zurcher
48c2c1dfba
eo2: rename func parameter into _func_
2014-04-10 04:20:15 +01:00
Jérémy Zurcher
3295c8faaa
eo2: add macros to feed op_descs
2014-04-10 04:20:15 +01:00
Jérémy Zurcher
f05f51dd60
eo2: _Eo_Class_Description swallows op_descs
...
remove OpDescs argument from macros,
eo2_get_op_id() uses binary search
2014-04-10 04:20:15 +01:00
Jérémy Zurcher
41aff7524d
eo2: clear _obj_ ptr at the end of eo2_do
2014-04-10 04:20:15 +01:00
Jérémy Zurcher
731f8e1dea
eo2: add optional macros eo2_call[v]
2014-04-10 04:20:15 +01:00
Jérémy Zurcher
bc6019c154
eo2: add comments end clean up
2014-04-10 04:20:15 +01:00
Jérémy Zurcher
23ae1fc453
eo2: use internal unref, break if eo2_start returns NULL
2014-04-10 04:20:15 +01:00
Jérémy Zurcher
473609e1d3
eo2: eliminate the need of OPID and Eo_Op_Func_Description
...
at class elaboration, sort the op descriptions using the function pointer.
when calling a function, do a dichotomic search in the
class op descriptions to find the corresponding OP_ID,
then keep it in a static variable.
2014-04-10 04:20:15 +01:00
Cedric Bail
d0153fabc1
eo2: make macro pass C++ compiler.
2014-04-10 04:20:15 +01:00
Jérémy Zurcher
ef873b7b29
eo2: fix obj_data retrieval and speed up
...
obj_data which is built from func->src not obj->klass.
replace eo2_func_get() and eo2_data_scope_get() calls
with one call to eo2_call_resolve().
2014-04-10 04:20:15 +01:00
Jérémy Zurcher
73f1d2a09e
eo2: add macros for functions with no argument
2014-04-10 04:20:15 +01:00
Tom Hacohen
9e042c0686
eo2: pass the object id and data to function call
2014-04-10 04:20:15 +01:00
Jérémy Zurcher
71341334a9
eo2: add eo2_data_scope_get()
...
use it in function body
2014-04-10 04:20:15 +01:00