packages/python/pypy/a93dfb333afe.patch

33 lines
1.4 KiB
Diff

# HG changeset patch
# User Matti Picus <matti.picus@gmail.com>
# Date 1554034536 -10800
# Node ID a93dfb333afe34ac02b15e997749cd3902ed96c0
# Parent 9f383b2e30c6ac084fe95fd781abfc2fceffdc9f
preserve order on extra effects (sets are not ordered on cpython2)
diff --git a/rpython/jit/codewriter/effectinfo.py b/rpython/jit/codewriter/effectinfo.py
--- a/rpython/jit/codewriter/effectinfo.py
+++ b/rpython/jit/codewriter/effectinfo.py
@@ -326,14 +326,17 @@
# a read or a write to an interiorfield, inside an array of
# structs, is additionally recorded as a read or write of
# the array itself
- extraef = set()
+ extraef = list()
for tup in effects:
if tup[0] == "interiorfield" or tup[0] == "readinteriorfield":
T = deref(tup[1])
if isinstance(T, lltype.Array) and consider_array(T):
- extraef.add((tup[0].replace("interiorfield", "array"),
- tup[1]))
- effects |= extraef
+ val = (tup[0].replace("interiorfield", "array"),
+ tup[1])
+ if val not in effects:
+ extraef.append(val)
+ # preserve order in the added effects issue bitbucket #2984
+ effects = tuple(effects) + tuple(extraef)
for tup in effects:
if tup[0] == "struct":