comp.lang.ada
 help / color / mirror / Atom feed
From: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson)
Subject: Re: Q: unboxed values and polymorphism
Date: 1996/06/18
Date: 1996-06-18T00:00:00+00:00	[thread overview]
Message-ID: <4q54mk$jtu@mulga.cs.mu.OZ.AU> (raw)
In-Reply-To: uvvwx1661tz.fsf@chaq.informatik.uni-tuebingen.de


Hannes Haug <Hannes.Haug@Student.Uni-Tuebingen.de> writes:

>> "TT" == Tucker Taft <stt@henning.camb.inmet.com> writes:
>
>    TT> Tightly encoded variant records seem more likely to be the answer.
>
>But will this give me unboxed integers and type information on the stack ?

I'm no Ada expert, but I think that the theoretical answer is "it
depends on the compiler" and that the practical answer is that existing
Ada compilers won't be able to pack pointers and tag bits into a single
word.  (Ada afficionados, please correct me if I'm wrong!)

It's definitely possible for a compiler to do this sort of packing of
variant records; the compiler for Mercury does this in many cases.
(I know this because I wrote quite a bit of the code that does it ;-)

--
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.




  parent reply	other threads:[~1996-06-18  0:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-15  0:00 Q: unboxed values and polymorphism Hannes Haug
1996-06-15  0:00 ` Jon S Anthony
1996-06-15  0:00 ` Robert Dewar
1996-06-16  0:00 ` Hannes Haug
1996-06-17  0:00   ` Hannes Haug
1996-06-18  0:00     ` Robert Dewar
1996-06-22  0:00       ` Robert A Duff
1996-06-22  0:00         ` Robert Dewar
1996-06-18  0:00     ` Fergus Henderson [this message]
1996-06-17  0:00   ` Tucker Taft
1996-06-17  0:00   ` Tucker Taft
1996-06-17  0:00     ` Tucker Taft
1996-06-22  0:00   ` Hannes Haug
1996-06-22  0:00     ` Robert Dewar
     [not found]       ` <uvvhgryr22d.fsf@chaq.informatik.uni-tuebingen.de>
1996-06-28  0:00         ` Robert Dewar
1996-07-02  0:00           ` Fergus Henderson
1996-06-18  0:00 ` Jon S Anthony
1996-06-19  0:00 ` Hannes Haug
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox