Author: Alex Gaynor <[email protected]>
Branch:
Changeset: r48598:a257711072e5
Date: 2011-10-29 19:31 +0200
http://bitbucket.org/pypy/pypy/changeset/a257711072e5/
Log: fix so these test don't rely on dict ordering
diff --git a/pypy/jit/metainterp/optimizeopt/virtualize.py
b/pypy/jit/metainterp/optimizeopt/virtualize.py
--- a/pypy/jit/metainterp/optimizeopt/virtualize.py
+++ b/pypy/jit/metainterp/optimizeopt/virtualize.py
@@ -294,7 +294,12 @@
optforce.emit_operation(self.source_op)
self.box = box = self.source_op.result
for index in range(len(self._items)):
- for descr, value in self._items[index].iteritems():
+ iteritems = self._items[index].iteritems()
+ # random order is fine, except for tests
+ if not we_are_translated():
+ iteritems = list(iteritems)
+ iteritems.sort(key = lambda (x, y): x.sort_key())
+ for descr, value in iteritems:
subbox = value.force_box(optforce)
op = ResOperation(rop.SETINTERIORFIELD_GC,
[box, ConstInt(index), subbox], None, descr=descr
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit