[pypy-svn] r48933 - pypy/dist/pypy/lang/smalltalk

tverwaes at codespeak.net tverwaes at codespeak.net
Thu Nov 22 18:06:49 CET 2007


Author: tverwaes
Date: Thu Nov 22 18:06:49 2007
New Revision: 48933

Modified:
   pypy/dist/pypy/lang/smalltalk/model.py
Log:
Size has to include header apparently.



Modified: pypy/dist/pypy/lang/smalltalk/model.py
==============================================================================
--- pypy/dist/pypy/lang/smalltalk/model.py	(original)
+++ pypy/dist/pypy/lang/smalltalk/model.py	Thu Nov 22 18:06:49 2007
@@ -319,11 +319,11 @@
         return w_CompiledMethod
 
     def getliteral(self, index):
+                                    # We changed this part
         return self.literals[index] #+ constants.LITERAL_START]
 
     def getliteralsymbol(self, index):
         w_literal = self.getliteral(index)
-        print "literals: %r" % self.literals
         assert isinstance(w_literal, W_BytesObject)
         return w_literal.as_string()    # XXX performance issue here
 
@@ -351,7 +351,7 @@
                 self.primitive is not None)       
 
     def size(self):
-        return self.getliteralsize() + len(self.bytes)
+        return self.getliteralsize() + len(self.bytes) + self.headersize()
 
     def getliteralsize(self):
         return self.literalsize * constants.BYTES_PER_WORD



More information about the Pypy-commit mailing list