[pypy-svn] r65415 - in pypy/branch/tagged-pointers-framework/pypy: rlib rpython/lltypesystem rpython/lltypesystem/test

cfbolz at codespeak.net cfbolz at codespeak.net
Mon May 25 17:44:47 CEST 2009


Author: cfbolz
Date: Mon May 25 17:44:47 2009
New Revision: 65415

Modified:
   pypy/branch/tagged-pointers-framework/pypy/rlib/objectmodel.py
   pypy/branch/tagged-pointers-framework/pypy/rpython/lltypesystem/rtagged.py
   pypy/branch/tagged-pointers-framework/pypy/rpython/lltypesystem/test/test_rtagged.py
Log:
Rename the very generic method name "getvalue" to get_untagged_value. So far
it's not really used much anyway, only in tests.


Modified: pypy/branch/tagged-pointers-framework/pypy/rlib/objectmodel.py
==============================================================================
--- pypy/branch/tagged-pointers-framework/pypy/rlib/objectmodel.py	(original)
+++ pypy/branch/tagged-pointers-framework/pypy/rlib/objectmodel.py	Mon May 25 17:44:47 2009
@@ -248,9 +248,9 @@
             raise OverflowError("UnboxedValue: argument out of range")
 
     def __repr__(self):
-        return '<unboxed %d>' % (self.getvalue(),)
+        return '<unboxed %d>' % (self.get_untagged_value(),)
 
-    def getvalue(self):   # helper, equivalent to reading the custom field
+    def get_untagged_value(self):   # helper, equivalent to reading the custom field
         if isinstance(self.__class__.__slots__, str):
             return getattr(self, self.__class__.__slots__)
         else:

Modified: pypy/branch/tagged-pointers-framework/pypy/rpython/lltypesystem/rtagged.py
==============================================================================
--- pypy/branch/tagged-pointers-framework/pypy/rpython/lltypesystem/rtagged.py	(original)
+++ pypy/branch/tagged-pointers-framework/pypy/rpython/lltypesystem/rtagged.py	Mon May 25 17:44:47 2009
@@ -53,7 +53,7 @@
 
     def convert_const_exact(self, value):
         self.setup()
-        number = value.getvalue()
+        number = value.get_untagged_value()
         return ll_int_to_unboxed(self.lowleveltype, number)
 
     def getvalue_from_unboxed(self, llops, vinst):

Modified: pypy/branch/tagged-pointers-framework/pypy/rpython/lltypesystem/test/test_rtagged.py
==============================================================================
--- pypy/branch/tagged-pointers-framework/pypy/rpython/lltypesystem/test/test_rtagged.py	(original)
+++ pypy/branch/tagged-pointers-framework/pypy/rpython/lltypesystem/test/test_rtagged.py	Mon May 25 17:44:47 2009
@@ -43,9 +43,9 @@
     res = interpret(fn1, [42], taggedpointers=True)
     assert res == 42
 
-def test_getvalue():
+def test_get_untagged_value():
     def fn1(n):
-        return C(n).getvalue()
+        return C(n).get_untagged_value()
     res = interpret(fn1, [42], taggedpointers=True)
     assert res == 42
 



More information about the Pypy-commit mailing list