3 ms·
OCaml also internally uses an intermediate code representation called C-- (or Cmm). I do not know if the two have any relationship.
by elehack 13y ago
OCaml also internally uses an intermediate code representation called C-- (or Cmm). I do not know if the two have any relationship.
- deleted 13y ago[deleted]
- _delirium 13y agoIt looks like OCaml's C-- predates this C--, but has had an influence on it. From Xavier Leroy, one of the lead Ocaml developers [1]: 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. [1] http://article.gmane.org/gmane.comp.lang.caml.inria/9436/ http://article.gmane.org/gmane.comp.lang.caml.inria/9436/