[pypy-svn] r27765 - pypy/dist/pypy/translator/cl

sanxiyn at codespeak.net sanxiyn at codespeak.net
Sat May 27 17:14:44 CEST 2006


Author: sanxiyn
Date: Sat May 27 17:14:41 2006
New Revision: 27765

Modified:
   pypy/dist/pypy/translator/cl/gencl.py
Log:
Small simplification


Modified: pypy/dist/pypy/translator/cl/gencl.py
==============================================================================
--- pypy/dist/pypy/translator/cl/gencl.py	(original)
+++ pypy/dist/pypy/translator/cl/gencl.py	Sat May 27 17:14:41 2006
@@ -245,7 +245,8 @@
     def emit_block(self, block):
         tag = self.blockref[block]
         yield "tag" + clrepr(str(tag), True)
-        if block.exitswitch is c_last_exception:
+        handle_exc = block.exitswith == c_last_exception
+        if handle_exc:
             yield "(handler-case (progn"
         for op in block.operations:
             emit_op = OpFormatter(self, op)
@@ -308,7 +309,7 @@
         else:
             retval = clrepr(block.inputargs[0])
             yield "(return %s)" % clrepr(retval, True)
-        if block.exitswitch is c_last_exception:
+        if handle_exc:
             yield ")"
 
     def format_jump(self, block):



More information about the Pypy-commit mailing list