search for: catch1

Displaying 7 results from an estimated 7 matches for "catch1".

Did you mean: catch
2007 Nov 27
2
[LLVMdev] [Caml-list] Ocaml(opt) & llvm
...ontains: ; ... 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 handle...
2007 Nov 28
0
[LLVMdev] [Caml-list] Ocaml(opt) & llvm
...address > ; 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'...
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
2010 Dec 01
0
[LLVMdev] RFC: Exception Handling Proposal Revised
...entical blocks (like the clean-up code) or you have a special way of defining the exit condition based on the predecessor (like PHI nodes for EH, which is horrible!). Example pseudo-IR: try: invoke func() to label %finally unwind to %catch catch: dispatch resume to %lpad catches [ ... ] catch1: ... br %finally lpad: br %finally (??) or cleanup code & continue unwinding? finally: cleanup code return (or continue unwinding?) cheers, --renato
2007 Nov 29
3
[LLVMdev] [Caml-list] Ocaml(opt) & llvm
...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-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 sign...
2010 Dec 01
2
[LLVMdev] RFC: Exception Handling Proposal Revised
On Wed, Dec 1, 2010 at 11:37 AM, Renato Golin <rengolin at systemcall.org> wrote: > On 1 December 2010 09:46, Bill Wendling <wendling at apple.com> wrote: >> Nor these. Basically, I want the basic block that's labeled a "landing pad" to be jumped to by only a dispatch resume or unwind edge of invoke. We could do this with the c.dtor and ch.int here, but it would