[pypy-commit] pypy store-sink-array: Too clever for translation. Simplify.
arigo
noreply at buildbot.pypy.org
Sun Jun 19 19:58:50 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: store-sink-array
Changeset: r45021:7c10b05cbcfe
Date: 2011-06-19 19:57 +0200
http://bitbucket.org/pypy/pypy/changeset/7c10b05cbcfe/
Log: Too clever for translation. Simplify.
diff --git a/pypy/jit/metainterp/optimizeopt/heap.py b/pypy/jit/metainterp/optimizeopt/heap.py
--- a/pypy/jit/metainterp/optimizeopt/heap.py
+++ b/pypy/jit/metainterp/optimizeopt/heap.py
@@ -150,13 +150,11 @@
def arrayitem_cache(self, descr, index):
try:
- try:
- submap = self.cached_arrayitems[descr]
- except KeyError:
- submap = self.cached_arrayitems[descr] = {}
- raise KeyError
- else:
- cf = submap[index]
+ submap = self.cached_arrayitems[descr]
+ except KeyError:
+ submap = self.cached_arrayitems[descr] = {}
+ try:
+ cf = submap[index]
except KeyError:
cf = submap[index] = CachedField()
return cf
More information about the pypy-commit
mailing list