[pypy-svn] r9506 - in pypy/dist/pypy: annotation translator

pedronis at codespeak.net pedronis at codespeak.net
Fri Feb 25 18:22:25 CET 2005


Author: pedronis
Date: Fri Feb 25 18:22:25 2005
New Revision: 9506

Modified:
   pypy/dist/pypy/annotation/binaryop.py
   pypy/dist/pypy/translator/annrpython.py
Log:
pbc are cached singletons, don't attach local info to them



Modified: pypy/dist/pypy/annotation/binaryop.py
==============================================================================
--- pypy/dist/pypy/annotation/binaryop.py	(original)
+++ pypy/dist/pypy/annotation/binaryop.py	Fri Feb 25 18:22:25 2005
@@ -297,10 +297,6 @@
                     classdef = classdef.commonbase(d[x])
             d[x] = classdef
         result =  SomePBC(d)
-        is_type_of1 = getattr(pbc1, 'is_type_of', None)
-        is_type_of2 = getattr(pbc2, 'is_type_of', None)
-        if is_type_of1 and is_type_of1 == is_type_of2:
-            result.is_type_of = is_type_of1
         return result
 
 class __extend__(pairtype(SomeImpossibleValue, SomeImpossibleValue)):

Modified: pypy/dist/pypy/translator/annrpython.py
==============================================================================
--- pypy/dist/pypy/translator/annrpython.py	(original)
+++ pypy/dist/pypy/translator/annrpython.py	Fri Feb 25 18:22:25 2005
@@ -375,9 +375,10 @@
                     assert in_except_block
                     assert last_exception_unused
                     if last_exception_unknown:
-                        cell = last_exception_object = self.bookkeeper.immutablevalue(a.value)
-                    else:
-                        cell = last_exception_object
+                        # this modeling should be good enough
+                        # the exc type is not seen by user code
+                        last_exception_object.const = a.value 
+                    cell = last_exception_object
                     cells.append(cell)
                     last_exception_unknown = False
                 else:



More information about the Pypy-commit mailing list