ocaml/ocaml — pull request #52 by chambart (2014-05-05 16:58:32+00:00)
Title: Allow static exception through trywith

Currently, it is not possible in Cmm to have an expression like:
````
(catch
(try
exit
with var 1)
with 2)
````
because the exception trap in not removed when branching from `exit` to its handler.
This patch adds the required Lpoptrap before branching and reset the stack offset after. @xavierleroy is it correct to do it that way ?

This kind of pattern is never generated by the current compiler, but could appear later when optimising out allocations of temporary block inside a try/with.

The provided example `testsuite/tests/asmcomp/test-exit-trywith.cmm` is tested on amd64/linux, ocamlopt has been compiled for every architecture/OS.