From: Hannes Haug <Hannes.Haug@Student.Uni-Tuebingen.de>
Subject: Re: Q: unboxed values and polymorphism
Date: 1996/06/22
Date: 1996-06-22T00:00:00+00:00 [thread overview]
Message-ID: <uvv688jg9es.fsf@chaq.informatik.uni-tuebingen.de> (raw)
In-Reply-To: uvv7mt7ubgd.fsf@chaq.informatik.uni-tuebingen.de
>>>>> "Robert" == Robert Dewar <dewar@cs.nyu.edu> writes:
Robert> Hannes says "But will this give me unboxed integers and
Robert> type information on the stack ? I'd try a private type
Robert> that's actually an integer. I'd use half of this integers
Robert> (-2**30 ... 2**30-1) for my fixnums. Values outside this
Robert> range would be indices in arrays of bignums or list
Robert> cells. So I'd have unboxed integers and type information
Robert> on the stack."
Robert> You are encoding at a very low level, appropriate for C
Robert> (since it is the only way to do things), but totally
Robert> inappropriate for Ada. You need a variant record with a
Robert> discriinant to indicate whether you have fixnums or
Robert> indices. The discriminant would be a single bit.
Absolutely not. On the stack I have words and not records. I work at a
low level because it is necessary. I really don't want to have a explicit
bit. I don't want to wrap/unwrap my data. Otherwise I would choose the low
bits as tag bits. This has nothing to do with C or Ada. It has to do with
costs of type checks, tagging, untagging and arithmetic on tagged integers.
If you keep telling people that this is evil they will never implement lisp,
prolog, ... in Ada.
-hannes
next prev parent reply other threads:[~1996-06-22 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 ` Robert Dewar
1996-06-15 0:00 ` Jon S Anthony
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
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 [this message]
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