[pypy-commit] pypy default: Revert a small part of 5c08e05e5ee8, with a theory written down in the comments.
arigo
noreply at buildbot.pypy.org
Mon Jun 16 16:21:03 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r72073:612b61347513
Date: 2014-06-16 16:20 +0200
http://bitbucket.org/pypy/pypy/changeset/612b61347513/
Log: Revert a small part of 5c08e05e5ee8, with a theory written down in
the comments.
diff --git a/rpython/jit/metainterp/heapcache.py b/rpython/jit/metainterp/heapcache.py
--- a/rpython/jit/metainterp/heapcache.py
+++ b/rpython/jit/metainterp/heapcache.py
@@ -190,17 +190,24 @@
if not self.is_unescaped(frombox):
del cache[frombox]
return
+ else:
+ # Only invalidate things that are either escaped or arguments
+ for descr, boxes in self.heap_cache.iteritems():
+ for box in boxes.keys():
+ if not self.is_unescaped(box) or box in argboxes:
+ del boxes[box]
+ for descr, indices in self.heap_array_cache.iteritems():
+ for boxes in indices.itervalues():
+ for box in boxes.keys():
+ if not self.is_unescaped(box) or box in argboxes:
+ del boxes[box]
+ return
- # Only invalidate things that are either escaped or arguments
- for descr, boxes in self.heap_cache.iteritems():
- for box in boxes.keys():
- if not self.is_unescaped(box) or box in argboxes:
- del boxes[box]
- for descr, indices in self.heap_array_cache.iteritems():
- for boxes in indices.itervalues():
- for box in boxes.keys():
- if not self.is_unescaped(box) or box in argboxes:
- del boxes[box]
+ # XXX not completely sure, but I *think* it is needed to reset() the
+ # state at least in the 'CALL_*' operations that release the GIL. We
+ # tried to do only the kind of resetting done by the two loops just
+ # above, but hit an assertion in "pypy test_multiprocessing.py".
+ self.reset(reset_virtuals=False)
def is_class_known(self, box):
return box in self.known_class_boxes
More information about the pypy-commit
mailing list