[pypy-commit] pypy improve-heap-caching-tracing: make the functional test pass too
cfbolz
noreply at buildbot.pypy.org
Sun Sep 4 12:04:35 CEST 2011
Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: improve-heap-caching-tracing
Changeset: r47063:b60991325598
Date: 2011-09-04 12:04 +0200
http://bitbucket.org/pypy/pypy/changeset/b60991325598/
Log: make the functional test pass too
diff --git a/pypy/jit/metainterp/pyjitpl.py b/pypy/jit/metainterp/pyjitpl.py
--- a/pypy/jit/metainterp/pyjitpl.py
+++ b/pypy/jit/metainterp/pyjitpl.py
@@ -395,7 +395,9 @@
@arguments("descr", "box")
def opimpl_new_array(self, itemsizedescr, countbox):
- return self.execute_with_descr(rop.NEW_ARRAY, itemsizedescr, countbox)
+ resbox = self.execute_with_descr(rop.NEW_ARRAY, itemsizedescr, countbox)
+ self.metainterp.heapcache.new(resbox)
+ return resbox
@arguments("box", "descr", "box")
def _opimpl_getarrayitem_gc_any(self, arraybox, arraydescr, indexbox):
diff --git a/pypy/jit/metainterp/test/test_tracingopts.py b/pypy/jit/metainterp/test/test_tracingopts.py
--- a/pypy/jit/metainterp/test/test_tracingopts.py
+++ b/pypy/jit/metainterp/test/test_tracingopts.py
@@ -464,8 +464,8 @@
return a1[0] + a2[0] + a1[0] + a2[0]
res = self.interp_operations(fn, [7])
assert res == 2 * 7 + 2 * 6
- self.check_operations_history(getarrayitem_gc=2)
+ self.check_operations_history(getarrayitem_gc=0)
res = self.interp_operations(fn, [-7])
assert res == 2 * -7 + 2 * -8
- self.check_operations_history(getarrayitem_gc=2)
+ self.check_operations_history(getarrayitem_gc=0)
More information about the pypy-commit
mailing list