[pypy-svn] r52293 - pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk
tverwaes at codespeak.net
tverwaes at codespeak.net
Sat Mar 8 06:40:15 CET 2008
Author: tverwaes
Date: Sat Mar 8 06:40:15 2008
New Revision: 52293
Modified:
pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/shadow.py
Log:
fixing bug, making sure that the home context used in updating a block context
is always the newest version. (invalidate invalidates s_home)
Modified: pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/shadow.py
==============================================================================
--- pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/shadow.py (original)
+++ pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/shadow.py Sat Mar 8 06:40:15 2008
@@ -558,15 +558,19 @@
class BlockContextShadow(ContextPartShadow):
def __init__(self, w_self, invalid):
- self._s_home = None
ContextPartShadow.__init__(self, w_self, invalid)
-
+ self._s_home = None
+
+ def invalidate(self):
+ self._s_home = None
+ AbstractShadow.invalidate(self)
+
def update_shadow(self):
- ContextPartShadow.update_shadow(self)
+ self.store_w_home(self.w_self()._vars[constants.BLKCTX_HOME_INDEX])
self._initialip = utility.unwrap_int(self.w_self()._vars[constants.BLKCTX_INITIAL_IP_INDEX])
self._initialip -= 1 + self.w_method().getliteralsize()
self._eargc = utility.unwrap_int(self.w_self()._vars[constants.BLKCTX_BLOCK_ARGUMENT_COUNT_INDEX])
- self.store_w_home(self.w_self()._vars[constants.BLKCTX_HOME_INDEX])
+ ContextPartShadow.update_shadow(self)
def update_w_self(self):
ContextPartShadow.update_w_self(self)
More information about the Pypy-commit
mailing list