CUMULATIVE_ARGS in hooks (Was: RFC: semi-automatic hookization)
Joern Rennecke
amylaar@spamcop.net
Wed Nov 17 19:31:00 GMT 2010
Quoting Nathan Froyd <froydnj@codesourcery.com>:
> On Tue, Nov 16, 2010 at 10:22:00PM -0500, Joern Rennecke wrote:
...
>> Does that mean you acknowledge that we shouldn't have CUMULATIVE_ARGS
>> taking hooks in the global target vector?
>
> Maybe? I think the methods discussed in this thread would be better for
> when we do move to C++. I don't think your original proposal or
> anything that sacrifices the type-safety of the current interface is the
> way forward.
You can find my original proposal fleshed out here:
http://gcc.gnu.org/ml/gcc-patches/2010-11/msg01769.html
I have also made an alternate proposal that keeps type safety, and regains
dependency sanity by moving the CUMULATIVE_ARGS taking hooks out of targetm:
http://gcc.gnu.org/ml/gcc-patches/2010-11/msg01810.html
This is conceptually closer to the C++ proposals; the new target_internalm
hook vector serves a similar purpose as a vtable for a cumulative_arg
class object.
More information about the Gcc
mailing list