[pypy-svn] r35517 - pypy/branch/temp/pypy/annotation

arigo at codespeak.net arigo at codespeak.net
Sat Dec 9 02:31:22 CET 2006


Author: arigo
Date: Sat Dec  9 02:31:19 2006
New Revision: 35517

Modified:
   pypy/branch/temp/pypy/annotation/annrpython.py
Log:
merging of http://codespeak.net/svn/pypy/branch/jit-real-world/pypy/annotation/annrpython.py
revisions 35112 to 35513:

    ------------------------------------------------------------------------
    r35215 | arigo | 2006-12-02 16:45:20 +0100 (Sat, 02 Dec 2006) | 8 lines
    
    (pedronis, arigo)
    
    - added hints in the new dispatch_bytecode() function
    - for now, restrict the hint-annotator to a very small subset of PyPy
      (it ends up seeing ~230 functions including ll helpers)
    - added a timeshift goal, now that hint-annotation seems to work
    - more support for Voids in the hint-annotator and the timeshifter
    
    ------------------------------------------------------------------------
    r35118 | arigo | 2006-11-29 13:45:27 +0100 (Wed, 29 Nov 2006) | 7 lines
    
    (arre, pedronis, arigo)
    
    Be afraid.  Very afraid.  (pedronis)
    
    A branch to experiment with throwing PyPy at the JIT.  (arigo)
    
    
    ------------------------------------------------------------------------


Modified: pypy/branch/temp/pypy/annotation/annrpython.py
==============================================================================
--- pypy/branch/temp/pypy/annotation/annrpython.py	(original)
+++ pypy/branch/temp/pypy/annotation/annrpython.py	Sat Dec  9 02:31:19 2006
@@ -737,13 +737,16 @@
             graph = self.bookkeeper.position_key[0]
             raise_nicer_exception(op, str(graph))
         if resultcell is None:
-            resultcell = annmodel.s_ImpossibleValue  # no return value
+            resultcell = self.noreturnvalue(op)
         elif resultcell == annmodel.s_ImpossibleValue:
             raise BlockedInference(self, op) # the operation cannot succeed
         assert isinstance(resultcell, annmodel.SomeObject)
         assert isinstance(op.result, Variable)
         self.setbinding(op.result, resultcell)  # bind resultcell to op.result
 
+    def noreturnvalue(self, op):
+        return annmodel.s_ImpossibleValue  # no return value (hook method)
+
     # XXX "contains" clash with SomeObject method
     def consider_op_contains(self, seq, elem):
         self.bookkeeper.count("contains", seq)



More information about the Pypy-commit mailing list