<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/12/68276101f2bc192b44f47bce0bf1c103"
  from="Nuutti Kotivuori &lt;naked+caml@n...&gt;"
  author="Nuutti Kotivuori"
  date="2003-12-12T21:31:24"
  subject="[Caml-list] Co-existence of byterun and asmrun impossible?"
  prev="2003/12/0b0cbd59b0fdc2fb5469101f41b02c0d"
  next="2003/12/ccc55211ed05144411fb273907604dfc"
  next-in-thread="2003/12/0e4da4c75885f73552c51dc666157cc5"
  prev-thread="2003/12/c8b08257908c25043521e0a3fe5eaa77"
  next-thread="2003/12/f9520b7839c36f67ec24f72b79457271"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Co-existence of byterun and asmrun impossible?">
<msg 
  url="2003/12/68276101f2bc192b44f47bce0bf1c103"
  from="Nuutti Kotivuori &lt;naked+caml@n...&gt;"
  author="Nuutti Kotivuori"
  date="2003-12-12T21:31:24"
  subject="[Caml-list] Co-existence of byterun and asmrun impossible?">
<msg 
  url="2003/12/0e4da4c75885f73552c51dc666157cc5"
  from="Alain.Frisch@e..."
  author="Alain.Frisch@e..."
  date="2003-12-12T21:58:21"
  subject="Re: [Caml-list] Co-existence of byterun and asmrun impossible?">
<msg 
  url="2003/12/c64b2acb17cf13e4de25dffc4adfb479"
  from="Nuutti Kotivuori &lt;naked+caml@n...&gt;"
  author="Nuutti Kotivuori"
  date="2003-12-12T22:49:56"
  subject="Re: [Caml-list] Co-existence of byterun and asmrun impossible?">
</msg>
</msg>
</msg>
</thread>

<contents>
It took me a while to realize this - and I just wish to make sure that
I haven't misunderstood anything.

The byterun and asmrun parts cannot co-exist in a single executable?

It's possible to *compile* native code with a compiler in bytecode,
and to compile bytecode with a compiler in native code, but it is not
possible to *run* bytecode with an executable that isn't bytecode? 
That is, a native compiled version of ocamlrun could never exist -
eg. no ocamlrun.opt nor ocaml.opt (native toplevel)?

I never thought of this before - it seems rather natural, but it's
still a bit of a bummer. This means that if a program needs to
interpret bytecode, no ocaml code in it may be natively compiled -
which in turn means any performance sensitive code needs to be hand
written in C.

Well, I'm not counting in the possibility of dynamically loading both
camlrun and asmrun and calling them directly - but even still they
couldn't share values and there would be two separate garbage
collectors.

I expect that this is a rather fundamental restriction and not easily
removed?

Bummed out,
-- Naked

-------------------
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

</contents>

</message>

