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
ocaml ast to machine at runtime
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-03-05 (15:55)
From: Sylvain Le Gall <sylvain@l...>
Subject: Re: ocaml ast to machine at runtime
On 05-03-2009, Joel Reymont <> wrote:
> I would like to compile trading systems written in a pascal-like  
> programming language to OCaml AST at runtime, convert it to machine  
> code and use it from the same running
> OCaml program (natdynlink?).
> Is it possible to do this without having gcc installed?
> The code I'm generating will need to be iterate over an array of
> doubles or be called from within the loop on every array element. It
> will also use a bunch of helper functions from my existing library.
> If I generate the code using LLVM then I'll need to write my helper
> functions in C and the only value I get from OCaml would be the
> parsing. If I write the helper functions in OCaml then I believe my
> loop will be slow as hell due to all the wrapping and unwrapping of
> OCaml values.
> Any suggestions?

Why not using the LLVM OCaml binding? It is directly shipped with LLVM. 
So you can write the entire generator in OCaml...

Sylvain Le Gall