Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] native code toplevel
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] native code toplevel
From: Stefano Zacchiroli <zack@cs.unibo.it>
> On Sun, Nov 17, 2002 at 02:16:57AM +0300, malc wrote:
> > b) Ocaml has no way to dynamically load .cmx or .cmxa
> 
> We have lived for a long time with ocamlmktop, we can also live with
> building of native code toplevels.

I have a strong feeling that what people are really asking for is the
ability to mix bytecode and native code.

The real difficulty with a native code toplevel is not to build the
toplevel itself, but the fact that every line you input to the
toplevel is a small program which must be dynamically compiled, linked
and run. With bytecode this is easy (a bit of meta glue), but with
pure native code this would be complicated and slow.  The ideal would
be to use native code libraries inside a toplevel compiling to
bytecode.

IIRC Fabrice le Feissant had some way to do it, by writing a bytecode
interpreter in ocaml itself, but I don't know how hard it would be to
adapt the toplevel to this approach (knowing that there is a fair bit
of magic in the way the toplevel links with itself).

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