[pypy-commit] pypy heapcache-refactor: Test, and probably fix translation
arigo
pypy.commits at gmail.com
Sat Mar 19 04:52:41 EDT 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: heapcache-refactor
Changeset: r83160:431096e1fd42
Date: 2016-03-19 09:52 +0100
http://bitbucket.org/pypy/pypy/changeset/431096e1fd42/
Log: Test, and probably fix translation
diff --git a/rpython/jit/metainterp/history.py b/rpython/jit/metainterp/history.py
--- a/rpython/jit/metainterp/history.py
+++ b/rpython/jit/metainterp/history.py
@@ -596,6 +596,7 @@
FO_REPLACED_WITH_CONST = r_uint(1)
FO_POSITION_SHIFT = 1
+FO_POSITION_MASK = r_uint(0xFFFFFFFE)
class FrontendOp(AbstractResOp):
@@ -615,7 +616,7 @@
def set_position(self, new_pos):
assert new_pos >= 0
- self.position_and_flags &= ~0xFFFFFFFE
+ self.position_and_flags &= ~FO_POSITION_MASK
self.position_and_flags |= r_uint(new_pos << FO_POSITION_SHIFT)
def is_replaced_with_const(self):
diff --git a/rpython/jit/metainterp/test/test_history.py b/rpython/jit/metainterp/test/test_history.py
--- a/rpython/jit/metainterp/test/test_history.py
+++ b/rpython/jit/metainterp/test/test_history.py
@@ -67,6 +67,8 @@
assert f.get_position() == 42
f = FrontendOp(-56)
assert f.get_position() == -56
+ f.set_position(6519)
+ assert f.get_position() == 6519
class TestZTranslated(StandaloneTests):
def test_ztranslated_same_constant_float(self):
More information about the pypy-commit
mailing list