diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-06-10 00:35:28 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-06-12 21:40:10 +0200 |
| commit | 935cf032524fe828ac9c4ef54c131bbae26bd1a9 (patch) | |
| tree | 4d6e4f2f8bf70c8a99069f060949cf899a3b27de /Makefile | |
| parent | c1439d43d0bda8704ef6a08f5bb624efca906617 (diff) | |
| download | sparse-dev-935cf032524fe828ac9c4ef54c131bbae26bd1a9.tar.gz | |
builtin: use a table for the builtins
The curent way to declare the builtins is not by using a table
but via a (variadic) function call, one for each builtin.
A table is preferable but a complication for doing this
is that some elements are not constant. For example, 'size_t_ctype'
is dynamically set in the early steps of the type initialization.
Doing a series of function calls allowed to circumvent this.
Fix this by:
* Using a constant temporary alias for non-constant entries. It's the
value of these alias that will be used when registering the builtins.
* using a table to declare the builtin functions.
Note: the motivation for doing this is to be able to add sub-tables
for the arch-specific builtins (and use the same mechanism
as for the main table).
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions
