[pypy-commit] pypy heap-caching-during-tracing: fix second half of the test
cfbolz
noreply at buildbot.pypy.org
Sat Jul 16 20:11:55 CEST 2011
Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: heap-caching-during-tracing
Changeset: r45683:feafe98006d1
Date: 2011-07-16 20:10 +0200
http://bitbucket.org/pypy/pypy/changeset/feafe98006d1/
Log: fix second half of the test
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
@@ -399,6 +399,10 @@
return tobox
resbox = self.execute_with_descr(rop.GETARRAYITEM_GC,
arraydescr, arraybox, indexbox)
+ if index >= 0:
+ if not cache:
+ cache = self.metainterp.heap_array_cache[arraydescr] = {}
+ cache[index] = arraybox, resbox
return resbox
More information about the pypy-commit
mailing list