Author: Carl Friedrich Bolz <[email protected]>
Branch: int-tag-untag-as-operations
Changeset: r48553:c0429bb24dd1
Date: 2011-10-28 10:13 +0200
http://bitbucket.org/pypy/pypy/changeset/c0429bb24dd1/
Log: use int_untag for untagging too (duh)
diff --git a/pypy/jit/metainterp/test/test_ajit.py
b/pypy/jit/metainterp/test/test_ajit.py
--- a/pypy/jit/metainterp/test/test_ajit.py
+++ b/pypy/jit/metainterp/test/test_ajit.py
@@ -3556,6 +3556,7 @@
pc += 1
return pc
res = self.meta_interp(main, [False, 100, True], taggedpointers=True)
+ self.check_loops(int_untag=1, int_tag_ovf=2)
def test_rerased(self):
from pypy.rlib.rerased import erase_int, unerase_int, new_erasing_pair
diff --git a/pypy/rpython/lltypesystem/rtagged.py
b/pypy/rpython/lltypesystem/rtagged.py
--- a/pypy/rpython/lltypesystem/rtagged.py
+++ b/pypy/rpython/lltypesystem/rtagged.py
@@ -59,8 +59,7 @@
def getvalue_from_unboxed(self, llops, vinst):
assert not self.is_parent
v2 = llops.genop('cast_ptr_to_int', [vinst], resulttype=lltype.Signed)
- c_one = inputconst(lltype.Signed, 1)
- return llops.genop('int_rshift', [v2, c_one], resulttype=lltype.Signed)
+ return llops.genop('int_untag', [v2], resulttype=lltype.Signed)
def gettype_from_unboxed(self, llops, vinst, can_be_none=False):
unboxedclass_repr = getclassrepr(self.rtyper, self.unboxedclassdef)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit