path: root/src/lib/eolian/eolian_database.h (unfollow)
AgeCommit message (Collapse)Author
2019-09-26eolian: rename param direction enum and fields for consistencyDaniel Kolesa
2019-09-26eolian: stricter checks for const() validityDaniel Kolesa
2019-09-25eolian: expose most API as stableDaniel Kolesa
There is still some TODO with builtin types, parameter directions and prefixes, which will be resolved in the next commits.
2019-09-24eolian: remove support for globalsDaniel Kolesa
This was meant to happen but did not previously happen. It is not ideal to do it now but better do it while we still can. In short, this removes one half of the variables API (keeps constants as they are) and repurposes the API to be only for constants. This is also better for consistency to match errors.
2019-09-16eolian: drop @ctor_param and the associated APIsDaniel Kolesa
This has been unused for a while, and has been just lingering around the code, so drop it so it doesn't make it into a release.
2019-09-09eolian: remove second parameter for eolian_type_c_type_getDaniel Kolesa
This has been replaced by newer APIs.
2019-09-04eolian: add APIs to get full C types of parameters/returns/fieldsDaniel Kolesa
These are needed because the type itself does not carry all the information it needs to carry (particularly by_ref).
2019-08-31eolian: add API to check if an inner type of complex type is @moveDaniel Kolesa
This complements the equivalent APIs of parameters and so on. It is not the same as the older type_is_owned API, which applied to everything.
2019-08-30eolian: add parsing for @move and @by_refDaniel Kolesa
The @by_ref qualifier is now allowed on parameters, returns and struct fields in the usual qualifier section. It will mean that this type is passed around by reference, and will only be allowed on types that are not already pointer-like. The @move qualifier will replace @owned as one with a clearer meaning. It means "transfer of ownership". It has the same semantics as the current @owned, i.e. on return values it transfers ownership of the value to the caller, on parameters it transfers ownership to the callee (the inverse is the default when not specified). On struct fields, it means the field will transfer together with the struct that contains it.
2019-08-16eolian: rename @class on methods to @staticDaniel Kolesa
Ref Ref
2019-07-17eolian: remove support for old free() syntaxDaniel Kolesa
Now freefuncs can only be specified on type declarations but not on types themselves. Also remove transitiveness of freefuncs.
2019-07-08eolian: remove builtin freefuncsDaniel Kolesa
For now this does not alter API behavior, so freefuncs are still transitive to aliases etc., this will get removed later.
2019-06-24eolian: add library support for declaring and using errorsDaniel Kolesa
You can now declare errors like this: error Foo = "message"; [[documentation]] Then you can use them as types like this: foo { return: error(Error1, Error2, ...); } They have a separate type category and storage. They are checked for redefinitions the same as anything else though. This does not add any generator support nor it adds any advanced checking. Ref T6890
2019-05-26eolian: initial versioning implementationDaniel Kolesa
This implements initial support for specifying unit versions. The default version is 1, specifying the basic feature level. If you want to specify another version, you need to specify something like `#version 2` at the beginning of the .eo or .eot file; the version number must be higher than 0 and lower than USHRT_MAX (typically 65536). The beginning of the file is now called the "header section"; other things may be added into the header section later. Version cannot be specified twice, and it cannot be specified once other contents (like types or class definition) appear. Comments do not count as other contents, so those are fine to appear before #version. @feature
2019-05-26eolian: rename @warn_unused and its associated APIDaniel Kolesa
@warn_unused in syntax is now called @no_unused - this is because "warning about unused" is a C thing (or rather, an extension to C) and various languages might want to use stricter behavior for this. Its associated API does the reverse now - it lets you query whether being unused is allowed at all. This is to match future behavior of Eolian (once it supports versioning) that will likely reverse it. @feature
2019-05-26eolian: remove param @nonullDaniel Kolesa
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-21eolian: remove @nullable keywordDaniel Kolesa
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-16eolian: add API to retrieve the C name of an objectDaniel Kolesa
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-09eolian: move from eo_prefix to c_prefixDaniel Kolesa
2019-03-08eolian: remove legacy handling API and most of generationDaniel Kolesa
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:
2019-03-08eolian: add support for marking type declarations betaDaniel Kolesa
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:
2019-02-28eolian: remove support for inlist/inarrayDaniel Kolesa
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-28eolian: add support for inlist structsDaniel Kolesa
This adds support for inlist structs, a special type of struct that can only be used with inlists. This differs from regular structs in a couple ways: 1) They are stored separately. Just like structs, enums, aliases have their own storage, so do inlist structs. 2) They can't be @extern, nor they can be opaque. 3) They are their own type of typedecl. 4) When they contain only one field, this field must be a value type always, cannot be a pointer. Like regular structs, they can have arbitrary fields, and they can have a pre-set free function via @free(). In C, the inlist structs will be generated exactly like ordinary ones, except they will have EINA_INLIST before the first field. Other binding generators can deal with them as they wish, for example to provide high level interfaces to them. This does not yet do the plumbing necessary to hook these into the type system, nor it adds generator support. @feature
2019-02-13eolian: allow tagging complete classes as BETAXavi Artigas
Summary: This allows using the @beta tag in classes, like this: class @beta Efl.Foo extends Efl.Bar { ... } This will surround the class definition in the .eo.h file with an EFL_BETA_API_SUPPORT #define, equivalent to tag every method and event with @beta. Test Plan: Nothing changes since no class uses this tag yet Reviewers: q66, bu5hm4n, zmike Reviewed By: q66 Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision:
2019-01-21eolian: add support for composite section into regular classesDaniel Kolesa
Each regular class can now have a section called 'composite', which can contain interfaces and interfaces only. This defines a list of interfaces that are allowed to be unimplemented on the class, as it is assumed the class will be composited with some other class implementing those interfaces. Only regular classes can have this, as only regular classes can be instantiated. It will also be necessary to check whether the classes in the section appear somewhere within the inheritance tree. For now, this testing is not being done. Example of usage: composite { Some.Magic.Interface; Another.Magic.Interface; } directly in the class body.
2019-01-16eolian: add validation to make sure all methods are implementedDaniel Kolesa
The checks are only done for regular classes. It's also disabled by default as too many methods would be unimplemented. Use EOLIAN_CLASS_UNIMPLEMENTED_WARN=1 to enable the errors.
2019-01-11eolian: introduce the keyword requiredMarcel Hollerbach
This introduces a new keyword called required. It only works on mixins. You can specify a list of regular/abstract classes in there. Classes specified after the required keyword are later used to verify the usage of the mixin. With this feature a mixin can define a list of types that the inheriting object (the object that inherits from a mixin) needs to fullfill, if one class that is required is not in the implemented classes, then eolian will bail out. Differential Revision:
2018-11-23eolian: implement new inherit behaviorDaniel Kolesa
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-04eolian: add eolian_implement_implementing_class_getDaniel Kolesa
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-10-31eolian: Add @ctor_param parameter to constructorsFelipe Magno de Almeida
Summary: This tagging keyword explicitly asks, for bindings that support it, that the constructor's parameters are added to the class constructor. Allowing the user to instantiate the class and call the constructor in a straightforward way. Reviewers: q66, woohyun, bu5hm4n, Jaehyun_Cho, segfaultxavi Reviewed By: q66 Subscribers: cedric, #reviewers, #committers, lauromoura Tags: #efl Differential Revision:
2018-05-03eolian: allow void and non-ownable types in futureDaniel Kolesa
2018-05-03eolian: add source file for the future static checkerDaniel Kolesa
2018-04-20eolian: add capturing of variables/typedecls in expr evalDaniel Kolesa
This will be used from validation to properly count actual dependencies of a unit.
2018-04-18eolian: make doc ref resolution globalDaniel Kolesa
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-18eolian: add internal api for dep deferring + parsing without depDaniel Kolesa
This is cleaner than adding into a hash manually. Additionally, it is now possible to request that the file be parsed not as a dep, but rather standalone, which will be useful later.
2018-04-12eolian: correct line/column number during doc reference validationDaniel Kolesa
Eolian doc objects now bundle debug information necessary to provide correct line/column numbers. It is not possible to get this information cirectly from the text, as it's reformatted and contains no extra whitespace or newlines beyond paragraph separators. Fixes T6701.
2018-04-11eolian: better/more robust class inheritance list replacementDaniel Kolesa
2018-03-22eolian: introduce main and staging areas properlyDaniel Kolesa
The state is now correctly divided. No merging is performed yet, which is to be done next.
2018-03-22eolian: clean rollback supportDaniel Kolesa
Previously, when an error happened in Eolian, the state was left in a presumably unusable and inconsistent condition. This work aims to change that, as all changes are committed into a staging area before being validated and merged back into main state. This is not yet complete, as units and by-file lookups are not currently involved in the rollback. This will change in the subsequent commits. @feature
2018-03-22eolian: add state staging areaDaniel Kolesa
This will be used for clean rollbacks on errors.
2018-03-20eolian: make use of panics for certain alloc errorsDaniel Kolesa
2018-03-20eolian: use new error logging for all recoverable errorsDaniel Kolesa
2018-03-16eolian: add APIs to get unit from object and state from unitDaniel Kolesa
2018-03-16eolian: intial API for a new error mechanismDaniel Kolesa
Unlike panic, this will be used to handle regular errors such as parse errors. There will be no jumps and you will be able to pass in a pointer to get the error data into some local memory. That way you will be able to override printing error messages.
2018-03-16eolian: initial API for a new panic mechanismDaniel Kolesa
This will be used to handle unrecoverable errors. For robustness, you will be able to set a custom panic callback, jump and try to recover manually.
2018-03-16eolian: more stringent and fine-grained validationDaniel Kolesa
2018-03-15eolian: reduce the number of database traversals during validationDaniel Kolesa
This significantly improves performance by not iterating certain paths multiple times.
2018-03-12eolian: expose short_name/namespaces via objectDaniel Kolesa
2018-03-11eolian: simplify namespace handlingDaniel Kolesa
This is mostly a preparation for rework of name(space) APIs.
2018-03-08eolian: remove old declaration APIsDaniel Kolesa