* Re: Need GC help
@ 2003-11-03 21:39 Richard Kenner
2003-11-03 22:39 ` Richard Henderson
0 siblings, 1 reply; 5+ messages in thread
From: Richard Kenner @ 2003-11-03 21:39 UTC (permalink / raw)
To: apinski; +Cc: gcc
> Look at ada/ada-tree.h at the TYPE_DIGITS_VALUE macro.
> How do I tell GC that that isn't a pointer?
You do not, use a struct for the long, just like all other front-ends.
Sorry, I don't follow you. Can you point me to an example?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Need GC help
2003-11-03 21:39 Need GC help Richard Kenner
@ 2003-11-03 22:39 ` Richard Henderson
0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2003-11-03 22:39 UTC (permalink / raw)
To: Richard Kenner; +Cc: apinski, gcc
On Mon, Nov 03, 2003 at 04:40:41PM -0500, Richard Kenner wrote:
> > Look at ada/ada-tree.h at the TYPE_DIGITS_VALUE macro.
> > How do I tell GC that that isn't a pointer?
>
> You do not, use a struct for the long, just like all other front-ends.
>
> Sorry, I don't follow you. Can you point me to an example?
struct lang_type GTY(())
{
union {
union lang_tree_node
GTY((desc ("TREE_CODE (&%h.generic) == GNAT_LOOP_ID"),
tag ("0"))) t;
long GTY((tag ("1"))) digits_value;
} GTY ((desc ("<condition that's true when digits_value is used>"))) u;
};
#define TYPE_CI_CO_LIST(NODE) \
(&TYPE_LANG_SPECIFIC (FUNCTION_TYPE_CHECK (NODE))->u.t.generic)
...
#define TYPE_DIGITS_VALUE(NODE) \
(TYPE_LANG_SPECIFIC (INTEGER_TYPE_CHECK (NODE))->u.digits_value)
r~
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Need GC help
@ 2003-11-03 22:49 Richard Kenner
0 siblings, 0 replies; 5+ messages in thread
From: Richard Kenner @ 2003-11-03 22:49 UTC (permalink / raw)
To: rth; +Cc: gcc
struct lang_type GTY(())
{
union {
union lang_tree_node
GTY((desc ("TREE_CODE (&%h.generic) == GNAT_LOOP_ID"),
tag ("0"))) t;
long GTY((tag ("1"))) digits_value;
} GTY ((desc ("<condition that's true when digits_value is used>"))) u;
};
What's confusing me here is that apparently the condition in "desc"
is getting called with the value of type_lang_specific. How do I go from
that value back to the tree node?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Need GC help
2003-11-03 21:33 Richard Kenner
@ 2003-11-03 21:37 ` Andrew Pinski
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Pinski @ 2003-11-03 21:37 UTC (permalink / raw)
To: Richard Kenner; +Cc: Andrew Pinski, gcc
On Nov 3, 2003, at 1:34 PM, Richard Kenner wrote:
> Look at ada/ada-tree.h at the TYPE_DIGITS_VALUE macro.
> How do I tell GC that that isn't a pointer?
You do not, use a struct for the long, just like all other front-ends.
Thanks,
Andrew Pinski
^ permalink raw reply [flat|nested] 5+ messages in thread
* Need GC help
@ 2003-11-03 21:33 Richard Kenner
2003-11-03 21:37 ` Andrew Pinski
0 siblings, 1 reply; 5+ messages in thread
From: Richard Kenner @ 2003-11-03 21:33 UTC (permalink / raw)
To: gcc
Look at ada/ada-tree.h at the TYPE_DIGITS_VALUE macro.
How do I tell GC that that isn't a pointer?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-11-03 22:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-03 21:39 Need GC help Richard Kenner
2003-11-03 22:39 ` Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2003-11-03 22:49 Richard Kenner
2003-11-03 21:33 Richard Kenner
2003-11-03 21:37 ` Andrew Pinski
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).