Author: Carl Friedrich Bolz <[email protected]>
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)
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to