Revision
2900
Author
lsansonetti@apple.com
Date
2009-10-26 14:42:12 -0700 (Mon, 26 Oct 2009)

Log Message

make sure break/next/redo inside exception handlers properly end the landing pad

Modified Paths

Diff

Modified: MacRuby/trunk/compiler.cpp (2899 => 2900)


--- MacRuby/trunk/compiler.cpp	2009-10-26 21:01:08 UTC (rev 2899)
+++ MacRuby/trunk/compiler.cpp	2009-10-26 21:42:12 UTC (rev 2900)
@@ -1703,6 +1703,9 @@
 	    break;
 
 	case NODE_BREAK:
+	    if (current_rescue) {
+		compile_landing_pad_footer();
+	    }
 	    if (within_loop) {
 		BranchInst::Create(current_loop_end_bb, bb);
 		current_loop_exit_val->addIncoming(val, bb);
@@ -1717,6 +1720,9 @@
 	    break;
 
 	case NODE_NEXT:
+	    if (current_rescue) {
+		compile_landing_pad_footer();
+	    }
 	    if (within_loop) {
 		BranchInst::Create(current_loop_begin_bb, bb);
 	    }
@@ -1729,6 +1735,9 @@
 	    break;
 
 	case NODE_REDO:
+	    if (current_rescue) {
+		compile_landing_pad_footer();
+	    }
 	    if (within_loop) {
 		BranchInst::Create(current_loop_body_bb, bb);
 	    }