[pypy-svn] r66051 - pypy/branch/pyjitpl5/pypy/annotation

arigo at codespeak.net arigo at codespeak.net
Tue Jun 30 16:35:48 CEST 2009


Author: arigo
Date: Tue Jun 30 16:35:47 2009
New Revision: 66051

Added:
   pypy/branch/pyjitpl5/pypy/annotation/specialize.py.merge.tmp
      - copied, changed from r66039, pypy/branch/pyjitpl5/pypy/annotation/specialize.py
Log:
merging of svn+ssh://codespeak.net/svn/pypy/trunk/pypy/annotation/specialize.py
revisions 62865 to 66039:

    ------------------------------------------------------------------------
    r65901 | benjamin | 2009-06-24 04:36:08 +0200 (Wed, 24 Jun 2009) | 1 line
    
    use real sets
    ------------------------------------------------------------------------


Copied: pypy/branch/pyjitpl5/pypy/annotation/specialize.py.merge.tmp (from r66039, pypy/branch/pyjitpl5/pypy/annotation/specialize.py)
==============================================================================
--- pypy/branch/pyjitpl5/pypy/annotation/specialize.py	(original)
+++ pypy/branch/pyjitpl5/pypy/annotation/specialize.py.merge.tmp	Tue Jun 30 16:35:47 2009
@@ -123,10 +123,10 @@
         example_args, example_value = self.table.iteritems().next()
         nbargs = len(example_args)
         # list of sets of possible argument values -- one set per argument index
-        sets = [{} for i in range(nbargs)]
+        sets = [set() for i in range(nbargs)]
         for args in self.table:
             for i in range(nbargs):
-                sets[i][args[i]] = True
+                sets[i].add(args[i])
 
         bookkeeper = self.funcdesc.bookkeeper
         annotator = bookkeeper.annotator
@@ -233,8 +233,8 @@
 
         # schedule this new graph for being annotated
         args_s = []
-        for set in sets:
-            values_s = [bookkeeper.immutablevalue(x) for x in set]
+        for arg_types in sets:
+            values_s = [bookkeeper.immutablevalue(x) for x in arg_types]
             args_s.append(unionof(*values_s))
         annotator.addpendinggraph(self.graph, args_s)
 



More information about the Pypy-commit mailing list