[pypy-svn] r38128 - pypy/branch/jit-virtual-world/pypy/jit/timeshifter/test
arigo at codespeak.net
arigo at codespeak.net
Thu Feb 8 00:19:26 CET 2007
Author: arigo
Date: Thu Feb 8 00:19:21 2007
New Revision: 38128
Modified:
pypy/branch/jit-virtual-world/pypy/jit/timeshifter/test/test_virtualizable.py
Log:
A test mainly to stare at the 386 assembler generated and check
if it is reasonable.
Modified: pypy/branch/jit-virtual-world/pypy/jit/timeshifter/test/test_virtualizable.py
==============================================================================
--- pypy/branch/jit-virtual-world/pypy/jit/timeshifter/test/test_virtualizable.py (original)
+++ pypy/branch/jit-virtual-world/pypy/jit/timeshifter/test/test_virtualizable.py Thu Feb 8 00:19:21 2007
@@ -419,6 +419,27 @@
assert res == 42
self.check_insns(getfield=0, malloc=2)
+ def test_residual_doing_nothing(self):
+ def g(xy):
+ pass
+
+ def f(xy):
+ hint(None, global_merge_point=True)
+ g(xy)
+ return xy.x + 1
+
+ def main(x, y):
+ xy = lltype.malloc(XY)
+ xy.vable_access = lltype.nullptr(XY_ACCESS)
+ xy.x = x
+ xy.y = y
+ v = f(xy)
+ return v
+
+ res = self.timeshift_from_portal(main, f, [2, 20],
+ policy=StopAtXPolicy(g))
+ assert res == 3
+
def test_late_residual_red_call(self):
def g(e):
xy = e.xy
More information about the Pypy-commit
mailing list