* Jumptables: How painful to hack?
@ 1999-03-30 21:09 Jason Merrill
1999-03-31 7:57 ` Ian Lance Taylor
0 siblings, 1 reply; 4+ messages in thread
From: Jason Merrill @ 1999-03-30 21:09 UTC (permalink / raw)
To: bfd
A question for folks who have worked on BFD for a while: How horrible are
jumptables to deal with? I'm looking at parameterizing the g++ ABI, and am
strongly considering that as an implementation strategy.
Jason
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Jumptables: How painful to hack?
1999-03-30 21:09 Jumptables: How painful to hack? Jason Merrill
@ 1999-03-31 7:57 ` Ian Lance Taylor
1999-03-31 11:16 ` Jason Merrill
0 siblings, 1 reply; 4+ messages in thread
From: Ian Lance Taylor @ 1999-03-31 7:57 UTC (permalink / raw)
To: jason; +Cc: bfd
Date: Tue, 30 Mar 1999 21:09:18 -0800
From: Jason Merrill <jason@cygnus.com>
A question for folks who have worked on BFD for a while: How horrible are
jumptables to deal with? I'm looking at parameterizing the g++ ABI, and am
strongly considering that as an implementation strategy.
I started to reply, but then I realized that it depends upon what you
mean by the g++ ABI. Do you mean the code that g++ generates, or do
you mean the files in gcc/cp? The former already uses jumptables, of
course, since that's what virtual functions are, and I'm not sure in
what sense the latter has an ABI.
Ian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Jumptables: How painful to hack?
1999-03-31 7:57 ` Ian Lance Taylor
@ 1999-03-31 11:16 ` Jason Merrill
1999-03-31 11:28 ` Ian Lance Taylor
0 siblings, 1 reply; 4+ messages in thread
From: Jason Merrill @ 1999-03-31 11:16 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: bfd
>>>>> Ian Lance Taylor <ian@zembu.com> writes:
> Date: Tue, 30 Mar 1999 21:09:18 -0800
> From: Jason Merrill <jason@cygnus.com>
> A question for folks who have worked on BFD for a while: How horrible
> are jumptables to deal with? I'm looking at parameterizing the g++
> ABI, and am strongly considering that as an implementation strategy.
> I started to reply, but then I realized that it depends upon what you
> mean by the g++ ABI. Do you mean the code that g++ generates, or do
> you mean the files in gcc/cp? The former already uses jumptables, of
> course, since that's what virtual functions are, and I'm not sure in
> what sense the latter has an ABI.
I mean the latter. The C++ ABI involves things like object layout,
handling of virtual functions and bases, name mangling and such things.
Jason
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Jumptables: How painful to hack?
1999-03-31 11:16 ` Jason Merrill
@ 1999-03-31 11:28 ` Ian Lance Taylor
0 siblings, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 1999-03-31 11:28 UTC (permalink / raw)
To: jason; +Cc: bfd
From: Jason Merrill <jason@cygnus.com>
Date: 31 Mar 1999 11:16:29 -0800
> Date: Tue, 30 Mar 1999 21:09:18 -0800
> From: Jason Merrill <jason@cygnus.com>
> A question for folks who have worked on BFD for a while: How horrible
> are jumptables to deal with? I'm looking at parameterizing the g++
> ABI, and am strongly considering that as an implementation strategy.
> I started to reply, but then I realized that it depends upon what you
> mean by the g++ ABI. Do you mean the code that g++ generates, or do
> you mean the files in gcc/cp? The former already uses jumptables, of
> course, since that's what virtual functions are, and I'm not sure in
> what sense the latter has an ABI.
I mean the latter. The C++ ABI involves things like object layout,
handling of virtual functions and bases, name mangling and such things.
I'd say the main lessons from BFD are:
* Define your interfaces clearly. People can't look at the code to
figure them out, since they won't look at all the possible targets
of an indirect call.
* BFD uses macros to hide the jumptable invocations and make them look
like a function call. I think this was a mistake. It makes it
harder for novices to understand what the code is doing. You can't
do a tags search to find the target of the call. Macros per se may
be useful, but don't make it look like an ordinary function.
Ian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-03-31 11:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-30 21:09 Jumptables: How painful to hack? Jason Merrill
1999-03-31 7:57 ` Ian Lance Taylor
1999-03-31 11:16 ` Jason Merrill
1999-03-31 11:28 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).