[pypy-svn] r35343 - pypy/dist/pypy/annotation

arigo at codespeak.net arigo at codespeak.net
Tue Dec 5 22:21:11 CET 2006


Author: arigo
Date: Tue Dec  5 22:21:09 2006
New Revision: 35343

Modified:
   pypy/dist/pypy/annotation/annrpython.py
Log:
(pedronis, arigo)

Trying to make pypy translatable again...


Modified: pypy/dist/pypy/annotation/annrpython.py
==============================================================================
--- pypy/dist/pypy/annotation/annrpython.py	(original)
+++ pypy/dist/pypy/annotation/annrpython.py	Tue Dec  5 22:21:09 2006
@@ -645,6 +645,7 @@
                 last_exc_value_vars = []
                 in_except_block = True
 
+            ignore_link = False
             cells = []
             renaming = {}
             for a,v in zip(link.args,link.target.inputargs):
@@ -662,6 +663,9 @@
                     if (link.exitcase, a) in knowntypedata:
                         knownvarvalue = knowntypedata[(link.exitcase, a)]
                         cell = pair(cell, knownvarvalue).improve()
+                        # ignore links that try to pass impossible values
+                        if cell == annmodel.s_ImpossibleValue:
+                            ignore_link = True
 
                     if hasattr(cell,'is_type_of'):
                         renamed_is_type_of = []
@@ -691,12 +695,12 @@
 
                     cells.append(cell)
 
+            if ignore_link:
+                continue
+
             if in_except_block:
                 last_exception_object.is_type_of = last_exc_value_vars
 
-            if annmodel.s_ImpossibleValue in cells:
-                continue    # ignore links that try to pass impossible values
-
             self.links_followed[link] = True
             self.addpendingblock(graph, link.target, cells)
 



More information about the Pypy-commit mailing list