the builtin_function hook
Rafael Espíndola
rafael.espindola@gmail.com
Sun Feb 12 20:52:00 GMT 2006
There is a lot of duplicated code in the hooks implementation in the
various front ends. I am trying to factor it a little bit.
I started with the builtin_function hook. Doing a mostly mechanical
work I came up with the attached patch. The patch doesn't touches the
C++ front end because it is organised a little differently and would
require more work.
I don't want to apply this patch right now because I think that it can
be made a little better. To do this I need some clarifications:
*) Why does a front end needs to know when a new builtin is added?
*) If the internal representation used is language independent, can we
change the signature of builtin_function to receive just the decl
node?
The next thing I will try to do is wrap all calls to
lang_hooks.builtin_function in a add_builtin_function (in which file
should it be?) and move the common code into it.
Any comments?
Thanks,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: builtin.patch
Type: application/octet-stream
Size: 12959 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20060212/03a110ca/attachment.obj>
More information about the Gcc
mailing list