From: skaller <skaller@users.sourceforge.net>
To: John Prevost <j.prevost@gmail.com>
Cc: Brian Hurt <bhurt@spnz.org>, Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Unboxing options, was RE: assertions or exceptions?
Date: 16 Jul 2004 07:42:35 +1000 [thread overview]
Message-ID: <1089927755.29648.653.camel@pelican.wigram> (raw)
In-Reply-To: <1089926230.29648.632.camel@pelican.wigram>
On Fri, 2004-07-16 at 07:17, skaller wrote:
I should rephrase this:
> This is wrong. The representation being suggested is:
>
> None -> NULL
> Some 'a -> pointer to 'a
>
> Clearly this represntation is faithful and nothing
> more than an interpretation of the corresponding C
> concept.
>
> Some Some 1 is obviously distinct from Some 1 as reqiuired:
> pointer to pointer to 1 is distinct from pointer to 1.
> Some None is a pointer to NULL, which is distinct from
> None which is just NULL.
What I'm saying is that the idea is not unboxing,
but untagging. Some 'a isn't a pointer to an 'a heap
value, but a pointer to a CAML_VALUE which is a pointer
to a heap value 'a. I don't see how the GC could
support this in Ocaml, since Some 'a isn't a CAML_VALUE
since it points to a box, not a heap object --
but in Felix it would work because the GC uses
RTTI to locate pointers.
So the idea is fine, but won't work with Ocaml GC.
There's be no saving dereferencing a Some value here.
The saving would be that simply loading the value
into a register would set a condition code in the
processor, avoiding any need to check the value
of a tag word.
Ugg .. sorry for the confusion :(
--
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850,
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2004-07-15 21:42 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-15 8:03 [Caml-list] " Radu Grigore
2004-07-15 10:18 ` Richard Jones
2004-07-15 10:28 ` Daniel Andor
2004-07-15 12:49 ` Radu Grigore
2004-07-15 13:33 ` Richard Jones
2004-07-15 13:58 ` Radu Grigore
2004-07-16 18:53 ` Aleksey Nogin
2004-07-17 2:55 ` John Prevost
2004-07-17 14:24 ` David MENTRE
2004-07-15 12:35 ` Jon Harrop
2004-07-15 13:45 ` Radu Grigore
2004-07-15 14:33 ` Jon Harrop
2004-07-15 15:05 ` Radu Grigore
2004-07-15 16:24 ` skaller
2004-07-15 15:38 ` [Caml-list] Unboxing options, was " Brian Hurt
2004-07-15 16:25 ` John Hughes
2004-07-15 17:00 ` Brian Hurt
2004-07-15 17:20 ` John Prevost
2004-07-15 19:14 ` Radu Grigore
2004-07-15 19:56 ` John Carr
2004-07-15 20:48 ` Brian Hurt
2004-07-15 20:49 ` John Carr
2004-07-15 21:15 ` John Prevost
2004-07-15 21:15 ` Karl Zilles
2004-07-15 21:26 ` Brian Hurt
2004-07-15 21:04 ` John Prevost
2004-07-15 21:17 ` skaller
2004-07-15 21:35 ` Brian Hurt
2004-07-15 21:51 ` skaller
2004-07-15 21:42 ` skaller [this message]
2004-07-16 0:35 ` Jacques GARRIGUE
2004-07-16 1:03 ` John Prevost
2004-07-16 2:00 ` Jacques GARRIGUE
2004-07-16 16:40 ` Xavier Leroy
2004-07-19 8:58 ` Damien Doligez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1089927755.29648.653.camel@pelican.wigram \
--to=skaller@users.sourceforge.net \
--cc=bhurt@spnz.org \
--cc=caml-list@inria.fr \
--cc=j.prevost@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox