[pypy-svn] r65424 - pypy/branch/pyjitpl5-experiments/pypy/interpreter

fijal at codespeak.net fijal at codespeak.net
Tue May 26 18:52:21 CEST 2009


Author: fijal
Date: Tue May 26 18:52:20 2009
New Revision: 65424

Modified:
   pypy/branch/pyjitpl5-experiments/pypy/interpreter/pyframe.py
Log:
promote valuestackdepth everywhere. if we don't we cannot perform optimizations


Modified: pypy/branch/pyjitpl5-experiments/pypy/interpreter/pyframe.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/interpreter/pyframe.py	(original)
+++ pypy/branch/pyjitpl5-experiments/pypy/interpreter/pyframe.py	Tue May 26 18:52:20 2009
@@ -131,14 +131,14 @@
     def pushvalue(self, w_object):
         depth = self.valuestackdepth
         self.valuestack_w[depth] = w_object
-        self.valuestackdepth = depth + 1
+        self.valuestackdepth = hint(depth + 1, promote=True)
 
     def popvalue(self):
         depth = self.valuestackdepth - 1
         assert depth >= 0, "pop from empty value stack"
         w_object = self.valuestack_w[depth]
         self.valuestack_w[depth] = None
-        self.valuestackdepth = depth
+        self.valuestackdepth = hint(depth, promote=True)
         return w_object
 
     def popstrdictvalues(self, n):
@@ -188,7 +188,7 @@
             if n < 0:
                 break
             self.valuestack_w[finaldepth+n] = None
-        self.valuestackdepth = finaldepth
+        self.valuestackdepth = hint(finaldepth, promote=True)
 
     def pushrevvalues(self, n, values_w): # n should be len(values_w)
         while True:
@@ -221,7 +221,7 @@
         while depth >= finaldepth:
             self.valuestack_w[depth] = None
             depth -= 1
-        self.valuestackdepth = finaldepth
+        self.valuestackdepth = hint(finaldepth, promote=True)
 
     def savevaluestack(self):
         return self.valuestack_w[:self.valuestackdepth]



More information about the Pypy-commit mailing list