Daniel Kolesa
60c733670d
eolian: intial API for a new error mechanism
...
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-16 16:07:12 +01:00
Daniel Kolesa
927bcfd60a
eolian: initial API for a new panic mechanism
...
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-16 15:41:57 +01:00
Daniel Kolesa
6c0180d7f8
eolian: more stringent and fine-grained validation
2018-03-16 00:14:13 +01:00
Daniel Kolesa
978ba5052d
eolian: reduce the number of database traversals during validation
...
This significantly improves performance by not iterating certain
paths multiple times.
2018-03-15 23:25:35 +01:00
Daniel Kolesa
0f0009cb4f
eolian: expose short_name/namespaces via object
2018-03-12 13:55:21 +01:00
Daniel Kolesa
665fc62916
eolian: simplify namespace handling
...
This is mostly a preparation for rework of name(space) APIs.
2018-03-11 17:35:13 +01:00
Daniel Kolesa
7a4669b1b7
eolian: remove old declaration APIs
2018-03-08 23:59:40 +01:00
Daniel Kolesa
2248131295
eolian: give objects names, and reduce duplication
2018-03-08 19:47:28 +01:00
Daniel Kolesa
917a5216f8
eolian: add APIs to retrieve declarations as objects
...
This will replace the old declarations API.
2018-03-08 19:00:32 +01:00
Daniel Kolesa
9594f09156
eolian: add API to query information about Objects
...
As nearly every Eolian handle is backed by an Eolian_Object,
this information is now publicly exposed and has an API. This
opens up an array of new possibilities for tooling, as you
can now externally query file names, line numbers etc.,
as well as cast arbitrary handles to Eolian_Object pointers
and back.
This will be expanded later and it will replace the Declaration
system, as it's cleaner, better integrated and more versatile.
@feature
2018-03-08 17:32:38 +01:00
Daniel Kolesa
436f2d3363
eolian: add API to get file name of a unit
2018-02-27 16:12:35 +01:00
Daniel Kolesa
6a284e48c9
eolian: eolian_* -> eolian_state_*, Eolian -> Eolian_State
2018-02-27 16:12:35 +01:00
Daniel Kolesa
39820fb5f5
eolian: simplify adding/refcounting objects
2018-02-23 15:25:55 +01:00
Daniel Kolesa
1a7dabeb74
eolian: proper in-unit storage for all declarations
...
This makes sure variables are stored as well as types within their
respective units. Also, declarations are now refcounted just like
any other Eolian object.
2018-02-23 15:25:55 +01:00
Daniel Kolesa
665b88204c
eolian: store types/typedecls in units
2018-02-22 11:19:22 +01:00
Daniel Kolesa
7b5a73b967
eolian: add eolian_object_add wrapper
2018-02-22 11:19:22 +01:00
Daniel Kolesa
a6d0e787e4
eolian: no need to store 'parsed' table anymore either
2018-01-31 19:14:15 +01:00
Daniel Kolesa
f0877c9329
eolian: no need to track currently parsing file anymore
2018-01-31 18:13:29 +01:00
Daniel Kolesa
b5794afa58
eolian: all dependency parsing is now deferred
2018-01-31 18:13:29 +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
b70604d018
eolian: cache enum expr in the database
2018-01-16 16:37:52 +01:00
Daniel Kolesa
29a9b9ad44
eolian: expose _eval_type to internals
2018-01-16 16:37:52 +01:00
Daniel Kolesa
19c16b671e
eolian: type_typedecl_get doesn't need a unit
2018-01-12 18:05:13 +01:00
Daniel Kolesa
db41734954
eolian: store typedecl/class in type
2018-01-12 18:05:13 +01:00
Daniel Kolesa
65ea735fd7
eolian: remove the toplevel information
2017-12-22 15:36:31 +01:00
Daniel Kolesa
373392d56e
eolian: remove now unused database init/shutdown
2017-12-15 17:11:11 +01:00
Daniel Kolesa
18e18ca74c
eolian: remove remaining global state (+ modify APIs accordingly)
2017-12-15 17:11:11 +01:00
Daniel Kolesa
9aaa5cf839
eolian: remove _cunit and prepare for returning actual units
2017-12-14 17:31:21 +01:00
Daniel Kolesa
2259b6f16f
eolian: remove parent info from units (actually doesn't make sense)
2017-12-14 16:45:13 +01:00
Daniel Kolesa
3ebd1f1506
eolian: store units in state
2017-12-07 19:11:58 +01:00
Daniel Kolesa
e7bf69fc04
eolian: make deferred parsing map non-global
2017-12-07 19:11:58 +01:00
Daniel Kolesa
2343e6cc54
eolian: make parsing/parsed files mapping non-global
2017-12-07 19:11:58 +01:00
Daniel Kolesa
9a5c3cfbe2
eolian: remove internal state struct (rely on external Eolian state)
2017-12-06 15:07:31 +01:00
Daniel Kolesa
a39d2e8fe5
eolian: move filenames hashes to state
2017-12-06 15:07:31 +01:00
Daniel Kolesa
a25327c62e
eolian: move constants to temporary state
2017-12-06 15:07:31 +01:00
Daniel Kolesa
21db23f702
eolian: move global vars to temporary state
2017-12-06 15:07:31 +01:00
Daniel Kolesa
7491f9353f
eolian: move enums to temporary state
2017-12-06 15:07:31 +01:00
Daniel Kolesa
51ec796497
eolian: move structs to temporary state
2017-12-06 15:07:31 +01:00
Daniel Kolesa
8428eaa663
eolian: store aliases in temporary state
2017-12-06 15:07:31 +01:00
Daniel Kolesa
9fb3abc662
eolian: store classes in temporary state
2017-12-06 15:07:31 +01:00
Daniel Kolesa
67e1c2ab88
eolian: add initial refcounting for database objects
...
This will be necessary once the unit system is in (it will be used
to keep track of multiple references to objects across units).
2017-12-05 16:41:42 +01:00
Daniel Kolesa
2a0f873c84
eolian: pass unit within validation engine
2017-12-05 16:41:42 +01:00
Daniel Kolesa
e83e089765
eolian: contain master state in a larger structure
2017-12-05 16:41:42 +01:00
Daniel Kolesa
6abb24b717
eolian: create an actual unit structure for files
...
Units now form an actual tree stored in their own hash. This will
later replace all global state of Eolian, by introducing a master
unit that you will pass around.
2017-12-05 16:41:42 +01:00
Daniel Kolesa
0dbbb18171
eolian: disallow ptr() on things that are already pointer-like
...
This disallows deeply nested pointers, you can only explicitly
ptr() on types that are strictly value types.
For a few cases where it was necessary to override this behavior,
you can use legacy(ptr(x)) as a temporary measure.
2017-11-03 15:30:10 +01:00
Daniel Kolesa
c8e7ad530e
eolian: properly free parts
2017-10-31 12:15:23 +01:00
Daniel Kolesa
0a92c0c61f
eolian: fill parts into db
2017-10-31 12:15:23 +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
a4c96ceb73
eolian: add part definition
2017-10-25 16:25:41 +02:00
Daniel Kolesa
05b395be47
eolian: validate classes in a recursive manner
...
This allows for proper order of validation which will improve our
performance when also validating for name duplicates.
2017-10-24 23:21:24 +02:00