Commit Graph

161 Commits

Author SHA1 Message Date
Daniel Kolesa d0fed247bb eolian: remove param @nonull
This has been deprecated for a while and is not strictly necessary
- as a part of an effort to stabilize Eolian, remove this. Eolian
will eventually gain support for versioning and use a reversed
behavior (i.e. no NULL by default), but the API it wlll use for
that will be very different. Features can always be added, it's
much harder to drop them.

@feature
2019-05-26 17:25:15 +02:00
Daniel Kolesa 5ea0195661 eolian: remove @nullable keyword
This was an experiment that never properly took off and was never
used by any generator. Its use was highly variable, so it could
not be relied upon. We will still want to reverse the current
behavior eventually (no null by default), but that will be
done with eo file versioning in the future.

@feature
2019-05-21 16:04:35 +02:00
Daniel Kolesa e5c9f5e76f eolian: rename eolian_event_c_name_get
This is for consistency with the new eolian_class_c_macro_get
as well as for better clarity, as c_name_get is already provided
by Object and refers to something else.
2019-05-16 15:57:39 +02:00
Daniel Kolesa b3a870c7bb eolian: rename eolian_typedecl_enum_field_c_name_get
This is to allow for better object oriented APIs, as the `c_name`
field would be inherited from Object. This also makes it more
clear in C.
2019-05-16 15:52:46 +02:00
Daniel Kolesa 4ab1f2388e eolian: add API to retrieve the C name of an object
This is to prepare for type/class renaming support. This adds
the necessary API to retrieve C-specific names. Other refactoring
is necessary elsewhere for now.

This also renames the old API eolian_class_c_name_get to
eolian_class_c_macro_get to avoid conflict as well as clarify
the intention.
2019-05-16 15:43:52 +02:00
Daniel Kolesa db57523e78 eolian: refactor parsing API and path handling
This splits the eolian_file_parse API into two, one for parsing
files already present in the database (always by filename) and
one for parsing paths.

It fixes several bugs/leaks on the way (incorrect use of
stringshare etc.) as well as adds checking for whether there
are no conflicting filenames at scan time, for free. That means
it is now no longer possible to scan two paths which have an eo
or eot file of the same name in them.

It should also be faster now.

It also fixes T7820.

@fix
2019-05-03 17:06:49 +02:00
Daniel Kolesa 37eee70d56 elua: add all missing eolian api bindings 2019-04-12 15:53:26 +02:00
Daniel Kolesa cf200a7d28 eolian: remove legacy handling API and most of generation
Summary:
This removes all Eolian API that deals with handling of legacy
code. It also removes the code using it in the generator as well
as bindings, but for now keeps generation of .eo.legacy.h types,
as there are still instances in our codebase where things are
otherwise broken. We can remove the rest once that is resolved.

Reviewers: zmike, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8255
2019-03-08 10:12:09 -05:00
Daniel Kolesa 1a17aff85f eolian: add support for marking type declarations beta
Summary:
This also simplifies the beta checking API by unifying it under
objects (makes much more sense that way) and reworks the validator
to have betaness support within its context state, allowing checks
to be done easily in any place.

The betaness checks are disabled for types for the time being,
because otherwise there are too many errors (types are assumed
to be stable as they are not tagged beta, but they reference beta
classes all over the place). Set EOLIAN_TYPEDECL_BETA_WARN to 1
in your environment to force enable the checks.

Reviewers: zmike, bu5hm4n, stefan_schmidt, lauromoura, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl, #eolian

Differential Revision: https://phab.enlightenment.org/D8102
2019-03-08 08:17:01 -05:00
Daniel Kolesa 4b1622b5fc eolian: remove support for inlist/inarray
This feature was kind of ill-conceived and never worked properly.
Since there isn't enough time to make it work right at this point
and there are no users of it in the API, remove it for now.

It might get added in the next release cycle, in a proper form.

@feature
2019-02-28 20:28:24 +01:00
Daniel Kolesa 535da54dac elua: fix typo in eolian bindings 2019-02-28 14:56:44 +01:00
Daniel Kolesa dc492b1586 eolian: introduce typed slice types
Summary:
This adds two new complex types, slice<T> and rw_slice<T>. This
is necessary to make the type useful to bindings, as Eina_Slice
on its own says nothing about what it's carrying and that prevents
useful code from being generated outside of C.

@feature

Reviewers: bu5hm4n, segfaultxavi, lauromoura, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7980
2019-02-22 16:18:49 +01:00
Daniel Kolesa 14ce54c303 eolian: implement new inherit behavior
Eolian now separates 'parent' and 'extensions'. For regular
classes, parent is the first item in the inherits list and
extesions is the rest. For interfaces and mixins, parent is
NULL and extends is the inherits list.

The reason for this is the separation of them in syntax in near
future. It also slightly changes the behavior; since for interfaces
and mixins, parent is always NULL now, you can freely inherit from
all types of classes without needing to manually put an interface
type as the first item of the inherits list.
2018-11-23 13:57:07 +01:00
Daniel Kolesa 82688c5ece eolian: expose API to retrieve the class of an event
This information has been stored and used in Eolian until now
but not exposed to the API user. While there are roundabout ways
to retrieve the class for an event, this one is direct and costs
us nothing.
2018-11-04 18:32:05 +01:00
Daniel Kolesa d0c96539f2 eolian: add eolian_implement_implementing_class_get
This will make it easier for generators and utilities to retrieve
the class that implemented a method/property/etc rather than the
class the implement was originally defined for. Thanks to this
it will no longer be necessary to carry the class pointer around
the place.
2018-11-04 16:12:53 +01:00
Daniel Kolesa e7b6e55f42 elua: add missing eolian bindings method needed for object casting
This enables updated docgen to work.
2018-10-10 13:57:59 +02:00
Daniel Kolesa 107bb9d2ed elua: fix outdated code in doc token ref resolution
This function was using outdated enum fields. This was fixed
on my local side but somehow never made it in, so make this code
make sense.
2018-09-05 13:09:57 +02:00
Daniel Kolesa b8b94cbfb8 elua: add check API to eolian bindings 2018-05-13 17:06:12 +02:00
Daniel Kolesa 543902f2ba eolian: make doc ref resolution global
Doc refs no longer introduce new dependencies into files. Instead,
they're parsed globally, and any doc ref lookup is also made
globally. This allows unit based dependencies to correspond more
to what files actually really need at compile time/runtime, with
docs being irrelevant to that; it also simplifies the API.

The doc resolution API now takes Eolian_State instead of
Eolian_Unit, too.
2018-04-18 16:38:14 +02:00
Daniel Kolesa bf1e3a702f eolian: event/function_get_by_name -> by_name_get 2018-03-16 14:26:15 +01:00
Daniel Kolesa 0ee6410add elua: inherit state from unit in eolian bindings 2018-03-14 17:03:33 +01:00
Daniel Kolesa 2d0a25c995 eolian: refactor doc ref resolution API 2018-03-14 16:51:11 +01:00
Daniel Kolesa 7d6e2561a4 elua: update eolian name APIs 2018-03-12 14:27:20 +01:00
Daniel Kolesa 342974977f eolian: resolve to Eolian_Objects instead of voids 2018-03-09 15:25:36 +01:00
Daniel Kolesa c7fd43ad4e eolian: return Eolian_Object_Type from ref resolver
This needs only one enum and allows for better interop.
2018-03-09 15:25:36 +01:00
Daniel Kolesa b58c901d2d elua: remove declaration api from eolian bindings 2018-03-08 22:58:22 +01:00
Daniel Kolesa 59aabb0945 elua: update eolian bindings for latest APIs
Added support for Eolian_Object, made other luaified types
"inherited" from Eolian_Object, removed type-specific file_get
as it was replaced by Object's file_get, declarations API still
in place
2018-03-08 22:35:27 +01:00
Daniel Kolesa 482c5d1ba2 eolian: get rid of old APIs for typedecl retrieval 2018-03-07 13:53:08 +01:00
Daniel Kolesa f596a97da6 eolian: remove old variable retrieval APIs 2018-03-07 13:25:28 +01:00
Daniel Kolesa 9e8d96671e elua: add missing APIs to eolian bindings 2018-03-02 14:39:57 +01:00
Daniel Kolesa 93dad9d6bb elua: objectify unit and redo class retrieval 2018-03-02 14:04:41 +01:00
Daniel Kolesa 9144045925 elua: update path retrieval APIs 2018-03-02 13:52:13 +01:00
Daniel Kolesa 5701ce22a3 elua: remove old dir scan/parse APIs 2018-03-02 13:43:16 +01:00
Daniel Kolesa e27336cee1 elua: add new API prototypes in eolian bindings 2018-03-02 13:37:00 +01:00
Daniel Kolesa 6a284e48c9 eolian: eolian_* -> eolian_state_*, Eolian -> Eolian_State 2018-02-27 16:12:35 +01:00
Daniel Kolesa d47610a732 eolian: do not require unit when stringifying types
As it is no longer necessary to pass unit when evaluating exprs,
it is not necessary to pass it here either. Convert all the APIs
to the new style and update all instances in our tree.
2018-01-16 16:39:05 +01:00
Daniel Kolesa dd2e579fec eolian: do not require unit for expr eval APIs
The necessary information is now stored directly in the expr
during database validation.

Also enable expr validation for params.
2018-01-16 16:37:52 +01:00
Daniel Kolesa c6436337a4 eolian: aliased_base_get funcs don't need unit 2018-01-12 18:05:13 +01:00
Daniel Kolesa 19c16b671e eolian: type_typedecl_get doesn't need a unit 2018-01-12 18:05:13 +01:00
Daniel Kolesa 707ed05d58 eolian: do not require unit for type_class_get 2018-01-12 18:05:13 +01:00
Daniel Kolesa 18e18ca74c eolian: remove remaining global state (+ modify APIs accordingly) 2017-12-15 17:11:11 +01:00
Daniel Kolesa c8aa30e698 eolian: make declaration APIs use units 2017-12-15 17:11:11 +01:00
Daniel Kolesa 8a1f93f698 eolian: pass state where necessary
This modifies the API so that global state removal is made
possible. It's still used internally for now but externally
the state is contained.
2017-12-05 16:41:42 +01:00
Daniel Kolesa 4f8a9b50f4 eolian: make inherits_get return a list of classes, not strings
Most of the time you need to retrieve the class from the string
anyway, so remove this relic of old Eolian and gain some small
performance benefits and extra convenience.

Subtly breaks API but everything should be updated.
2017-10-25 16:25:41 +02:00
Daniel Kolesa 5e788e3a5c elua: bind new eolian type builtin API 2017-09-22 21:03:23 +02:00
Daniel Kolesa 1577c576e6 eolian: remove static_array and terminated_array
These types are of questionable value and the API was not entirely
thought out - remove for now, and if a legitimate use is found
later, they may be readded (with a better API), but typically it
seems best to redesign the bad APIs around safe containers...
2017-09-22 18:01:15 +02:00
Daniel Kolesa 4bae2a7385 eolian: merge REGULAR and COMPLEX types 2017-09-22 17:46:02 +02:00
Daniel Kolesa 60d6aeeb2d elua: update for new eolian ownership system 2017-09-15 17:52:38 +02:00
Daniel Kolesa e55ab81835 eolian: always implicitly validate database and remove its API 2017-09-13 23:58:47 +02:00
Daniel Kolesa 8b5d555cf5 elua: update eolian bindings and make docgen work again 2017-08-30 19:46:41 +02:00