PR159: Exception handler blocks / register mixup
authorStefan Ring <stefan@complang.tuwien.ac.at>
Mon, 8 Aug 2011 17:44:17 +0000 (19:44 +0200)
committerStefan Ring <stefan@complang.tuwien.ac.at>
Mon, 8 Aug 2011 17:44:17 +0000 (19:44 +0200)
commit97408c9748640b078f801500620baec571dc6baa
treeb1449c211600e6e93fab30d0acf08b937d6c43f3
parentb77bcf3b81f9f42dfcaeec549a2a066e4b996110
PR159: Exception handler blocks / register mixup
* src/vm/jit/codegen-common.cpp: Fix register allocation at exception handler
block boundaries.
The concept of a block type is flawed because an exception handler block can
also be reached via normal control flow. I guess subroutine blocks are safe
because they expect a different type on the stack (returnAddress), and any
attempt at reaching them normally would not get past the verifier, although I
don't know how this is handled in CACAO.

The conditional branches should be handled as well, but as there is a lot of
platform-specific code involved as well as lots of register clobbering
potential, I'll leave it at that for now.
src/vm/jit/codegen-common.cpp