caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sylvain Le Gall <sylvain@le-gall.net>
To: caml-list@inria.fr
Subject: Re: ocaml ast to machine at runtime
Date: Thu, 5 Mar 2009 15:55:22 +0000 (UTC)	[thread overview]
Message-ID: <slrngqvtfa.e8q.sylvain@gallu.homelinux.org> (raw)
In-Reply-To: <19147175-3CFE-4AF5-9C8D-D286E5D2B058@gmail.com>

On 05-03-2009, Joel Reymont <joelr1@gmail.com> 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...

Regards,
Sylvain Le Gall


  reply	other threads:[~2009-03-05 15:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-05 14:59 Joel Reymont
2009-03-05 15:55 ` Sylvain Le Gall [this message]
2009-03-05 16:26   ` [Caml-list] " Joel Reymont

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrngqvtfa.e8q.sylvain@gallu.homelinux.org \
    --to=sylvain@le-gall.net \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).