From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8de933d44255f226 X-Google-Attributes: gid103376,public From: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson) Subject: Re: Q: unboxed values and polymorphism Date: 1996/06/18 Message-ID: <4q54mk$jtu@mulga.cs.mu.OZ.AU>#1/1 X-Deja-AN: 160738339 references: organization: Comp Sci, University of Melbourne newsgroups: comp.lang.ada Date: 1996-06-18T00:00:00+00:00 List-Id: Hannes Haug writes: >> "TT" == Tucker Taft 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 | "I have always known that the pursuit WWW: | of excellence is a lethal habit" PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.