Author: Brian Kearns <[email protected]>
Branch:
Changeset: r70133:2d49948e8eba
Date: 2014-03-20 15:57 -0400
http://bitbucket.org/pypy/pypy/changeset/2d49948e8eba/
Log: simplify
diff --git a/rpython/jit/metainterp/optimizeopt/heap.py
b/rpython/jit/metainterp/optimizeopt/heap.py
--- a/rpython/jit/metainterp/optimizeopt/heap.py
+++ b/rpython/jit/metainterp/optimizeopt/heap.py
@@ -308,12 +308,11 @@
descrs = op.getdescr().get_extra_info().extradescrs
assert descrs # translation hint
descr1 = descrs[0]
- descr2 = descrs[1]
- if descr1 in self.cached_dict_reads:
+ try:
d = self.cached_dict_reads[descr1]
- else:
+ except KeyError:
d = self.cached_dict_reads[descr1] = args_dict()
- self.corresponding_array_descrs[descr2] = descr1
+ self.corresponding_array_descrs[descrs[1]] = descr1
args = self.optimizer.make_args_key(op)
try:
res_v = d[args]
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit