caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: STARYNKEVITCH Basile <Basile.Starynkevitch@cea.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Ocaml and C--
Date: Tue, 5 Jun 2001 13:46:44 +0200	[thread overview]
Message-ID: <20010605134644.B9156@pauillac.inria.fr> (raw)
In-Reply-To: <15123.34597.907480.784076@gargle.gargle.HOWL>; from Basile.Starynkevitch@cea.fr on Tue, May 29, 2001 at 01:25:25PM +0200

> Supposing that QC-- will deliver it promises (but Norman Ramsey, Simon
> Peyton Jones and Christian Lindig are impressively serious and clever
> guys), will Ocaml switch to target C-- or will Ocaml continue to
> natively target the usual architectures (x86, Alpha, Sparc, ia64,
> x86-64...)?

The x86-64 generator is in the works, but not there yet -- mostly
because the hardware is not there yet either :-)

To answer your question, switching to C-- will be an option when C--
has code generators for all the platforms of interest for OCaml, and
is sufficiently better than the hand-written OCaml code generators
(e.g. in performance or portability).  OCaml is already at a stage
where it has decent code generators for many platforms, so the effort
of switching to a new framework must be compensated by other
advantages.

The situation is very different for new compilers, or existing
compilers that do not (yet) have good native-code generators; in this
case, C-- is a lot more interesting.

> What is the relation between C-- and Ocaml (apart a mutual respect of
> the leading developers in each team)?

I think I'm the one who coined the name "C--" to refer to a low-level,
weakly-typed intermediate code with operations corresponding roughly
to machine instructions, and minimal support for exact garbage
collection and exceptions.  See my POPL 1992 paper describing the
experimental Gallium compiler.  Such an intermediate code is still in
use in the ocamlopt compiler.

I had many interesting discussions with Simon PJ and Norman Ramsey
when they started to design their intermediate language.  Simon liked
the name "C--" and kindly asked permission to re-use the name.

However, C-- is more general than the intermediate code used by
ocamlopt, since it is designed to accommodate the needs of many source
languages, and present a clean, abstract interface to the GC and
run-time system.  The ocamlopt intermediate code is somewhat
specialized for the needs of Caml and for the particular GC we use.

At any rate, I think C-- is an excellent design and I wish the C--
team the best of luck in implementing and popularizing it.

- Xavier Leroy
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


  parent reply	other threads:[~2001-06-05 11:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-29 11:25 STARYNKEVITCH Basile
2001-05-29 19:30 ` Norman Ramsey
2001-06-05 10:44   ` reig
2001-06-05 11:46 ` Xavier Leroy [this message]
2001-05-30 16:33 Hao-yang Wang
2001-06-05 21:23 David Gurr

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=20010605134644.B9156@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=Basile.Starynkevitch@cea.fr \
    --cc=caml-list@inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).