[macruby-changes] [2900] MacRuby/trunk/compiler.cpp

source_changes at macosforge.org source_changes at macosforge.org
Mon Oct 26 14:42:14 PDT 2009


Revision: 2900
          http://trac.macosforge.org/projects/ruby/changeset/2900
Author:   lsansonetti at 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:
--------------
    MacRuby/trunk/compiler.cpp

Modified: MacRuby/trunk/compiler.cpp
===================================================================
--- 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);
 	    }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091026/e6f6a0ec/attachment.html>


More information about the macruby-changes mailing list