caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Byte-code -> native code conversion?
@ 2002-01-03  0:16 Walter B. Rader
  2002-01-03  0:37 ` Warp
  0 siblings, 1 reply; 2+ messages in thread
From: Walter B. Rader @ 2002-01-03  0:16 UTC (permalink / raw)
  To: caml-list


In theory, is it possible to "convert" a Caml byte-code program into
a native executable (without the source code of that program being
available)?

I'm wondering if it would be possible to distribute Caml programs in
byte-code format for portability, and the user may then choose to compile
the program to native code for speed.

Is this possible?  Difficult?  Any thoughts?

Thanks,

Walter Rader


-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] Byte-code -> native code conversion?
  2002-01-03  0:16 [Caml-list] Byte-code -> native code conversion? Walter B. Rader
@ 2002-01-03  0:37 ` Warp
  0 siblings, 0 replies; 2+ messages in thread
From: Warp @ 2002-01-03  0:37 UTC (permalink / raw)
  To: Walter B. Rader, caml-list

> In theory, is it possible to "convert" a Caml byte-code program into
> a native executable (without the source code of that program being
> available)?
>
> I'm wondering if it would be possible to distribute Caml programs in
> byte-code format for portability, and the user may then choose to compile
> the program to native code for speed.
>
> Is this possible?  Difficult?  Any thoughts?

I think it won't be too much difficult to write a virtual machine which will
convert on-the-flow ocaml bytecode into native asm code, and then call it.
But seems like much efforts have been made in register assignation of the
ocaml interpreter ( under GCC ) to make the interpreter running faster, so
you can use bytecode compilation without a big speed loss.

Anyway, ocaml bytecode "translated" to native asm won't be as much optimized
as native can be.

Warp

-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-01-03  0:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-03  0:16 [Caml-list] Byte-code -> native code conversion? Walter B. Rader
2002-01-03  0:37 ` Warp

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