Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Byte-code -> native code conversion?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-01-03 (00:40)
From: Warp <warplayer@f...>
Subject: Re: [Caml-list] Byte-code -> native code conversion?
> 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.


Bug reports:  FAQ:
To unsubscribe, mail  Archives: