Author: jonathan
Date: Sat Jul 26 07:14:50 2008
New Revision: 29755

Modified:
   trunk/compilers/pct/src/PAST/Compiler.pir

Log:
[pct] Fix the Null PMC exceptions that could occur in the return_pir control 
handler. This resolves at least one Rakudo ticket, and should help anyone using 
NQP who was also seeing this bug.

Modified: trunk/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- trunk/compilers/pct/src/PAST/Compiler.pir   (original)
+++ trunk/compilers/pct/src/PAST/Compiler.pir   Sat Jul 26 07:14:50 2008
@@ -614,6 +614,7 @@
     ##  handle 'return' exceptions
     $S0 = self.'uniquereg'('P')
     bpost.'push_pirop'('getattribute', $S0, 'exception', '"type"')
+    bpost.'push_pirop'('if_null', $S0, rethrowlabel)
     bpost.'push_pirop'('ne', $S0, .CONTROL_RETURN, rethrowlabel)
     bpost.'push_pirop'('getattribute', $S0, 'exception', '"payload"')
     bpost.'push_pirop'('return', $S0)

Reply via email to