[pypy-svn] r32545 - in pypy/branch/timeshift-refactoring/pypy/jit: codegen/i386/test hintannotator

arigo at codespeak.net arigo at codespeak.net
Wed Sep 20 22:21:22 CEST 2006


Author: arigo
Date: Wed Sep 20 22:21:20 2006
New Revision: 32545

Modified:
   pypy/branch/timeshift-refactoring/pypy/jit/codegen/i386/test/test_genc_ts.py
   pypy/branch/timeshift-refactoring/pypy/jit/hintannotator/model.py
Log:
Minor fix, and some more hacking at greenargs().


Modified: pypy/branch/timeshift-refactoring/pypy/jit/codegen/i386/test/test_genc_ts.py
==============================================================================
--- pypy/branch/timeshift-refactoring/pypy/jit/codegen/i386/test/test_genc_ts.py	(original)
+++ pypy/branch/timeshift-refactoring/pypy/jit/codegen/i386/test/test_genc_ts.py	Wed Sep 20 22:21:20 2006
@@ -15,7 +15,7 @@
     SEPLINE = 'running residual graph...\n'
     
     def annotate_interface_functions(self):
-        annhelper = self.htshift.annhelper
+        annhelper = self.hrtyper.annhelper
         RGenOp = self.RGenOp
         SEPLINE = self.SEPLINE
         ml_generate_code = self.ml_generate_code

Modified: pypy/branch/timeshift-refactoring/pypy/jit/hintannotator/model.py
==============================================================================
--- pypy/branch/timeshift-refactoring/pypy/jit/hintannotator/model.py	(original)
+++ pypy/branch/timeshift-refactoring/pypy/jit/hintannotator/model.py	Wed Sep 20 22:21:20 2006
@@ -33,6 +33,7 @@
     fixed = False
     read_positions = None
     greenargs_cached = None
+    is_call_result = False
 
     def __init__(self, bookkeeper=None, spaceop=None):
         self.bookkeeper = bookkeeper
@@ -65,7 +66,7 @@
             if self.greenargs_cached is not None:
                 return self.greenargs_cached
             frame = GreenHandlerFrame(annotator)
-        if self.spaceop.opname == 'direct_call':     # ah haa
+        if self.is_call_result:
             return frame.greencallresult(self.spaceop)
         else:
             for v in self.spaceop.args:
@@ -345,6 +346,7 @@
 
         if isinstance(hs_res, SomeLLAbstractConstant):
             hs_res.myorigin = bookkeeper.myorigin()
+            hs_res.myorigin.is_call_result = True
 
         # we need to make sure that hs_res does not become temporarily less
         # general as a result of calling another specialized version of the



More information about the Pypy-commit mailing list