search for: patternn

Displaying 5 results from an estimated 5 matches for "patternn".

Did you mean: patterns
2007 Nov 27
2
[LLVMdev] [Caml-list] Ocaml(opt) & llvm
...; ... rest of stack ... ; return address ; old caml_exception_pointer ; Restore caml_exception_pointer. pop 0(caml_exception_pointer) ; Jump straight to the nearest landing pad. ret The try-with expression is where the trickery lies. The expression try body with pattern1 -> catch1 | patternN -> catchN is compiled to: ; 'Call' a label within the function. call try_block ; This is the landing pad. The exception is in the return register. ; Try to match a handler. $r2 = $1 matches pattern1 branch to handler1_block if $r2 $r2 = $1 matches patternN branch to handlerN_block if...
2007 Nov 28
0
[LLVMdev] [Caml-list] Ocaml(opt) & llvm
...> ; old caml_exception_pointer > ; Restore caml_exception_pointer. > pop 0(caml_exception_pointer) > > ; Jump straight to the nearest landing pad. > ret Nice. > 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-forward to normal landing pads. The only significant difference is how it dynamically registers the callback and how it continues unwinding. If you were interested in adding this to llvm as some new EH intrinsics, I wouldn't be oppos...
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 29
3
[LLVMdev] [Caml-list] Ocaml(opt) & llvm
.... 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-forward to normal landing pads. Certainly the primitives are more or less identical to LLVM's. There is a strict stack of handlers, though, and I'm not sure how easy that is to reconstruct. > The only significant dif...