1. Pypy
  2. Untitled project
  3. lang-smalltalk

Commits

timfel  committed 2152a48

(cfbolz, timfel) _shadow as class-level default, and clear on become

  • Participants
  • Parent commits 233e9c8
  • Branches default

Comments (0)

Files changed (1)

File spyvm/model.py

View file
  • Ignore whitespace
 ###    variables.  The number of bytes used for this purpose is the value of
 ###    the last byte in the method.
 
+    _shadow = None
+
     def __init__(self, bytecount=0, header=0):
         self.setheader(header)
         self.bytes = ["\x00"] * bytecount
-        self._shadow = None
 
     def become(self, w_other):
         if not isinstance(w_other, W_CompiledMethod):
         self.literalsize, w_other.literalsize = w_other.literalsize, self.literalsize
         self.w_compiledin, w_other.w_compiledin = w_other.w_compiledin, self.w_compiledin
         self.islarge, w_other.islarge = w_other.islarge, self.islarge
+        self._shadow = w_other._shadow = None
         W_AbstractObjectWithIdentityHash._become(self, w_other)
         return True