Version française
Home     About     Download     Resources     Contact us    
Browse thread
Using OCaml's run-time from LLVM-generated native code
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alain Frisch <alain@f...>
Subject: Re: [Caml-list] Using OCaml's run-time from LLVM-generated native code
Jon Harrop wrote:
> Despite the availability of that code it seems that few people can use it 
> correctly and I am one of them.

What part of memory.h do you fail to understand?

> int apply(int n) {
>   CAMLlocal2(nv, fibn);
>   nv = copy_int64(n);
>   fibn = fib(nv);
>   caml_gc_full_major(0);
>   return Int64_val(fib(nv));
> }
> 
> Is that correct code?

No, this function does not follow the rules of Section 18.5.1.


-- Alain