[pypy-svn] r22806 - in pypy/dist/pypy/jit: . test

pedronis at codespeak.net pedronis at codespeak.net
Sat Jan 28 19:17:12 CET 2006


Author: pedronis
Date: Sat Jan 28 19:17:10 2006
New Revision: 22806

Modified:
   pypy/dist/pypy/jit/hintmodel.py
   pypy/dist/pypy/jit/test/test_hint_annotation.py
Log:
fix.



Modified: pypy/dist/pypy/jit/hintmodel.py
==============================================================================
--- pypy/dist/pypy/jit/hintmodel.py	(original)
+++ pypy/dist/pypy/jit/hintmodel.py	Sat Jan 28 19:17:10 2006
@@ -28,11 +28,15 @@
                 seen[o] = True
                 for o1 in o.visit(seen):
                     yield o1
+
+    def __repr__(self):
+        return "O" + (self.fixed and "f" or "")
                     
 class SomeLLAbstractValue(annmodel.SomeObject):
 
     def __init__(self, T):
         self.concretetype = T
+        assert self.__class__ != SomeLLAbstractValue
 
 class SomeLLAbstractConstant(SomeLLAbstractValue):
 
@@ -64,7 +68,7 @@
 
     def hint(hs_c1, hs_flags):
         if hs_flags.const.get('variable', False): # only for testing purposes!!!
-            return SomeLLAbstractValue(hs_c1.concretetype)
+            return SomeLLAbstractVariable(hs_c1.concretetype)
         assert hs_flags.const['concrete']
         for o in hs_c1.origins:
             for o1 in o.visit():

Modified: pypy/dist/pypy/jit/test/test_hint_annotation.py
==============================================================================
--- pypy/dist/pypy/jit/test/test_hint_annotation.py	(original)
+++ pypy/dist/pypy/jit/test/test_hint_annotation.py	Sat Jan 28 19:17:10 2006
@@ -20,6 +20,8 @@
     hs = hannotator.build_graph_types(graph1, [SomeLLAbstractConstant(v.concretetype,
                                                                       {OriginTreeNode(): True})
                                                for v in graph1.getargs()])
+    #hannotator.translator.graphs.append(graph1)
+    #hannotator.translator.view()
     return hs
 
 def test_simple():
@@ -200,7 +202,9 @@
     assert hs.concretetype == lltype.Signed
     assert len(hs.origins) == 1
     assert len(hs.origins.keys()[0].origins) == 2
-    
+
+
+
 
     
 



More information about the Pypy-commit mailing list