Commit Graph

97 Commits

Author SHA1 Message Date
Daniel Kolesa 7e94eb22b4 eolian: mark pure virtual funcs outside of implements
This is a better syntax and should've been like this in the first place.
2016-05-12 16:15:24 +01:00
Cedric BAIL 842a020e1f eolian: add support for restartable event. 2016-04-20 15:53:16 -07:00
Felipe Magno de Almeida dc954d8dba eolian: add Eolian support for Eina Promises
Add a promise object to allows Eolian interface to include promises
as a way to have asynchronous value return and composibility.

The usage is like this in a .eo file:

class Foo {
   methods {
      bar {
         params {
            @inout promise: Promise<int>;
         }
      }
   }
}

Which will create the following API interface:

void foo_bar(Eo* obj, Eina_Promise** promise);

and a Eina_Promise_Owner for the implementation, like this:

void _foo_bar(Eo* obj, Private_Data* pdata, Eina_Promise_Owner* promise);

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-06 14:34:15 -07:00
Tom Hacohen 7d8cd6c40f Revert "ecore: Create Promises"
Reverting this at Felipe's request following my email. There are many
things I strongly object to in this commit. I've touched the surface of
those on the ML (which doesn't work at the moment), though we need to
better discuss it.

The gist:
1. dlsym is a really bad hack that is not even needed.
2. I don't see why eo should even be aware of promises. It's not aware
of list, hash and etc.
3. The eolian changes were done wrong.

This should have been discussed and consulted before done, even if only
because of the amount of hacks it includes and the cross-domain (ecore,
eo and eolian) nature of it.

This reverts commit f9ba80ab33.
2016-03-08 14:23:57 +00:00
Felipe Magno de Almeida f9ba80ab33 ecore: Create Promises
Add a promise object that allows Eolian interface to include promises
as a way to have asynchronous value return and composibility.

The usage is like this in a .eo file:

class Foo {
   methods {
      bar {
         params {
            promise: Promise<int>;
         }
      }
   }
}

Which will create the following API interface:

void foo_bar(Ecore_Promise** promise);

and the equivalent declaration for implementation.

However, the API function will instantiate the Promise for the
user and the implementer of the class.
2016-03-06 17:55:33 -03:00
Daniel Kolesa e061d49aac eolian: completely clean up the type system 2016-03-03 18:58:11 +00:00
Daniel Kolesa c95350016d eolian: add parsing and generation of hot events
Unfreezable events can now be marked @hot.

@feature
2016-02-02 17:55:01 +00:00
Daniel Kolesa b3867ce395 eolian: turn "undefined type" into its own EOLIAN_TYPE 2015-11-19 14:05:16 +00:00
Daniel Kolesa 7ae6781451 eolian: disable parsing of old style docs 2015-09-03 15:08:08 +01:00
Daniel Kolesa 9a01ab5dd7 eolian: try replacing '.' with locale specific decimal point
This fixes parsing of floating point number with locales that use
a comma as decimal separator, as strtof/strtod follows locale
specific conventions.

@fix
2015-06-25 10:44:01 +01:00
Daniel Kolesa a4485484f1 eolian: Eolian_Object for docs 2015-06-02 18:27:46 +01:00
Daniel Kolesa 0703cc0f5e eolian: initial lexing of documentation 2015-06-02 18:12:09 +01:00
Daniel Kolesa 1a48c31f81 eolian: "generic_value" builtin type 2015-05-29 12:03:57 +01:00
Daniel Kolesa 3efca75615 eolian: reserve __builtin_event_cb 2015-05-29 11:19:27 +01:00
Daniel Kolesa 80000e993e eolian: better error reporting (include correct token info) 2015-05-27 11:30:51 +01:00
Daniel Kolesa b339313e4b eolian: remove obsolete code dealing with multiple classes per file 2015-05-22 16:46:07 +01:00
Daniel Kolesa 54974b074b eolian: remove const_get/const_set support
This was made obsolete by per-accessor values. It was
also hacky and i've wanted to remove it for a while.
2015-05-20 18:05:45 +01:00
Daniel Kolesa 8834f8e02d eolian: initial lex/parse for import statement 2015-05-19 14:25:45 +01:00
Daniel Kolesa e0fe487856 eolian: use fprintf(stderr) rather than eina_log for compile errors 2015-05-14 16:33:42 +01:00
Daniel Kolesa b5a7a9b556 eolian: remove old property syntax support 2015-05-07 17:35:33 +01:00
Daniel Kolesa 95a79d5f3b eolian: reserve @beta and @property 2015-05-07 11:35:14 +01:00
Daniel Kolesa be6415d662 eolian: parsing of @nullable and @optional args on func params 2015-02-12 11:14:45 +00:00
Daniel Kolesa 49aebd063e eolian: add eolian_function_is_c_only
This function allows us to mark functions that are not bindable.
Also remove some obsolete code.
2014-12-03 14:59:24 +00:00
Daniel Kolesa 5b9ece9c85 eolian: remove support for function types
These won't be needed because of Eo callbacks. They're also difficult
to handle in bindings, so this will relieve bindings of some effort.
2014-11-27 17:20:21 +00:00
Daniel Kolesa d26152391f eolian: add support for @optional ctor tag
This implements task T1804.
@feature
2014-11-20 15:21:55 +00:00
Daniel Kolesa 0be3aefdc7 eolian: remove some unused funcs 2014-09-22 12:47:30 +01:00
Daniel Kolesa 3d8069f226 eolian: remove str_items from temps 2014-09-12 15:04:18 +01:00
Daniel Kolesa 87559458f2 eolian: get rid of a list 2014-09-12 15:01:10 +01:00
Daniel Kolesa a1646ff61d eolian: remove eo_definitions 2014-09-12 13:42:53 +01:00
Daniel Kolesa 44cecb6a87 eolian: simplify more fill code 2014-09-11 11:48:46 +01:00
Daniel Kolesa f55572d79e eolian: remove Eo_Class_Def (fill bits still remaining) 2014-09-11 10:50:48 +01:00
Daniel Kolesa f86c2d4e5a eolian: remove accessor params feature
Temporarily replace it with @const_get and @const_set tags in values section.
2014-09-10 15:06:43 +01:00
Daniel Kolesa 7786b96359 eolian: builtin complex types
From now on, there are 5 builtin complex types, particularly accessor, array,
iterator, hash and list. All other types are simple - they can't have a complex
part. Also, the <> now binds to the type itself, not the pointer. More builtin
complex types will be added as needed.
2014-09-08 14:53:13 +01:00
Daniel Kolesa d2702a4fad eolian: remove @constructor syntax 2014-09-01 16:02:40 +01:00
Daniel Kolesa 21530bd5d8 eolian: preliminary support for new constructors section 2014-09-01 15:35:50 +01:00
Daniel Kolesa 3e5da03f7d eolian: update virtual to the new syntax (as per wiki) 2014-08-29 11:40:29 +01:00
Daniel Kolesa b69b90832f eolian: remove constructors section cruft 2014-08-27 15:43:47 +01:00
Daniel Kolesa ef380c56b6 eolian: support for setting a free function to values in eo files 2014-08-21 09:26:05 +01:00
Daniel Kolesa 33c39282b1 eolian: support "eo: null;" for legacy only functions/properties 2014-08-21 09:26:05 +01:00
Daniel Kolesa e6954d143d eolian: drop Eina_Value
Because of Eina_Value being less than optimal in our usage, we're dropping it in Eolian.
This simplifies the code and makes it easier to bind to other languages, which
will aid new generators. Also, we're dropping long double support from eo files
and expressions as it causes an ABI breakage in gcc 4.4.
2014-08-21 09:26:05 +01:00
Daniel Kolesa be68f9e1fa eolian: initial parsing code and API declarations for enums 2014-08-21 09:26:04 +01:00
Daniel Kolesa 65332eb3ca eolian: var parsing (global and constant)
This makes the API effectively functional. Also, I added new API
eolian_variable_is_extern to match structs and typedefs.
2014-08-21 09:26:04 +01:00
Daniel Kolesa 70bf1eac24 eolian: add infrastructure for globals and constants
Nothing parses yet, and no API is exposed. Also, move the remaining instances of file
inside of existing structures to Eolian_Object and parse basename only once.
2014-08-21 09:26:04 +01:00
Daniel Kolesa a57c729b10 eolian: consume private/protected modifier on events 2014-08-21 09:26:04 +01:00
Daniel Kolesa 1be7656af6 eolian: expression mode for lexer
This way we can only lex expr related tokens (operators etc.) when actually
about to parse an expression. That allows stuff like nested complex types
without the lexer treating the endings as right shift.
2014-08-21 09:26:03 +01:00
Daniel Kolesa 8c1b9ed3e2 eolian: initial API for expression evaluation
This commit also does several side (related) changes. Particularly, it updates
the Eolian C generator to use the new API, it adds missing expr types (null, char)
and masks, updates the API dealing with default return values to use expressions
instead of strings and does several fixes (mainly in lexer) around the place.
It also disallows single quoted strings as those are reserved for characters.
2014-08-21 09:26:03 +01:00
Daniel Kolesa 96f360a7d1 eolian: lexing of multichar binary operators 2014-08-21 09:26:03 +01:00
Daniel Kolesa 436a37f0b9 eolian: initial support for expression parsing 2014-08-21 09:26:03 +01:00
Daniel Kolesa 5cc18bfd5a eolian: fix: remove leftover keywords 2014-07-28 11:57:37 +01:00
Daniel Kolesa 94404b403c eolian: parser support for constructor qualifier
This will be needed when the constructors {} section goes away.
2014-07-24 13:01:47 +01:00