Displaying 5 results from an estimated 5 matches for "caml_exception_point".
Did you mean:
caml_exception_pointer
2007 Nov 27
2
[LLVMdev] [Caml-list] Ocaml(opt) & llvm
...startup which terminates the program. The matching expression is
sufficient to implement finally (x -> expr) and catch-all (x -> expr;
raise x). Each finally expression requires its own try-with expression.
The codegen for raise is simple. It just reads a saved return address
from the caml_exception_pointer global and returns through several
stack frames in one go. The expression raise expr is compiled as such:
; Store the exception value in the return register.
$r1 = ...
; Change the stack pointer.
load $sp <- 0(caml_exception_pointer)
; The stack now contains:
; ... rest of stack ...
;...
2007 Nov 27
0
[LLVMdev] [Caml-list] Ocaml(opt) & llvm
On Nov 26, 2007, at 11:30 AM, Gordon Henriksen wrote:
>>
>> Of course, I do know that there are some typing issues and
>> theoritical points which I deliberately ignore here. I'm supposing
>> the guy wanting to LLVM for Ocaml is knowing that he seeks trouble.
>
> The ocaml type system is easily represented in LLVM. The only real
> mismatches I'm aware of
2007 Nov 26
2
[LLVMdev] [Caml-list] Ocaml(opt) & llvm
On Nov 26, 2007, at 13:27, Basile STARYNKEVITCH wrote:
> As some might probably know, the LLVM compiler http://llvm.org/ has
> (at least in its latest SVN snapshot) a binding for Ocaml. This
> means that one could code in Ocaml some stuff (eg a JIT-ing
> compiler) which uses (and links with) LLVM libraries.
Yep! There are no bindings for the JIT (just for codegen), but it has
2007 Nov 28
0
[LLVMdev] [Caml-list] Ocaml(opt) & llvm
...Daniel Berlin pointed out on IRC, the language model is trivial. It has
> just three exception-handling primitives:
> raise expr
> try expr with matching
> exception id ( tuple-type-expr )?
ok.
> The codegen for raise is simple. It just reads a saved return address from
> the caml_exception_pointer global and returns through several stack frames in
> one go. The expression raise expr is compiled as such:
>
> ; Store the exception value in the return register.
> $r1 = ...
>
> ; Change the stack pointer.
> load $sp <- 0(caml_exception_pointer)
>
> ; The stack n...
2007 Nov 29
3
[LLVMdev] [Caml-list] Ocaml(opt) & llvm
On Nov 28, 2007, at 15:18, Chris Lattner wrote:
> On Tue, 27 Nov 2007, Gordon Henriksen wrote:
>>
>
>> The codegen for raise is simple. It just reads a saved return
>> address from the caml_exception_pointer global and returns through
>> several stack frames in one go.
>
> Nice.
Yup.
>> The try-with expression is where the trickery lies. The expression
>> try body with pattern1 -> catch1 | patternN -> catchN is compiled to:
>
> This seems pretty straight-forw...