[pypy-svn] r65453 - pypy/branch/tagged-pointers-framework/pypy/lang/smalltalk

cfbolz at codespeak.net cfbolz at codespeak.net
Wed May 27 15:03:15 CEST 2009


Author: cfbolz
Date: Wed May 27 15:03:14 2009
New Revision: 65453

Modified:
   pypy/branch/tagged-pointers-framework/pypy/lang/smalltalk/model.py
Log:
Adapt smalltalk vm to make the translation.taggedpointers option do something.


Modified: pypy/branch/tagged-pointers-framework/pypy/lang/smalltalk/model.py
==============================================================================
--- pypy/branch/tagged-pointers-framework/pypy/lang/smalltalk/model.py	(original)
+++ pypy/branch/tagged-pointers-framework/pypy/lang/smalltalk/model.py	Wed May 27 15:03:14 2009
@@ -19,7 +19,7 @@
 from pypy.rlib.rarithmetic import intmask
 from pypy.lang.smalltalk import constants, error
 from pypy.tool.pairtype import extendabletype
-from pypy.rlib.objectmodel import instantiate
+from pypy.rlib.objectmodel import instantiate, UnboxedValue
 from pypy.lang.smalltalk.tool.bitmanipulation import splitter
 
 class W_Object(object):
@@ -96,14 +96,15 @@
            False means swapping failed"""
         return False
 
-class W_SmallInteger(W_Object):
+
+# the UnboxedValue mixin means the object can potentially be stored in unboxed
+# form
+
+class W_SmallInteger(W_Object, UnboxedValue):
     """Boxed integer value"""
     # TODO can we tell pypy that its never larger then 31-bit?
     __slots__ = ('value',)     # the only allowed slot here
 
-    def __init__(self, value):
-        self.value = value
-
     def getclass(self, space):
         """Return SmallInteger from special objects array."""
         return space.w_SmallInteger



More information about the Pypy-commit mailing list