Author: Alex Gaynor <[email protected]>
Branch:
Changeset: r58951:4405d9cc37a7
Date: 2012-11-16 07:49 -0800
http://bitbucket.org/pypy/pypy/changeset/4405d9cc37a7/
Log: a test for the last commit
diff --git a/pypy/jit/metainterp/test/test_heapcache.py
b/pypy/jit/metainterp/test/test_heapcache.py
--- a/pypy/jit/metainterp/test/test_heapcache.py
+++ b/pypy/jit/metainterp/test/test_heapcache.py
@@ -412,6 +412,19 @@
assert not h.is_unescaped(box1)
assert not h.is_unescaped(box2)
+ def test_ops_dont_escape(self):
+ h = HeapCache()
+ h.new(box1)
+ h.new(box2)
+ assert h.is_unescaped(box1)
+ assert h.is_unescaped(box2)
+ h.invalidate_caches(rop.INSTANCE_PTR_EQ, None, [box1, box2])
+ assert h.is_unescaped(box1)
+ assert h.is_unescaped(box2)
+ h.invalidate_caches(rop.INSTANCE_PTR_NE, None, [box1, box2])
+ assert h.is_unescaped(box1)
+ assert h.is_unescaped(box2)
+
def test_circular_virtuals(self):
h = HeapCache()
h.new(box1)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit