Author: Antonio Cuni <[email protected]>
Branch: faster-rstruct-2
Changeset: r91298:f1c2d4165559
Date: 2017-05-15 15:19 +0200
http://bitbucket.org/pypy/pypy/changeset/f1c2d4165559/
Log: fix for the recent changes to Bytearray, which has got an extra
_offset field now. This code is a bit suboptimal because it contains
lots of guards :(
diff --git a/pypy/module/pypyjit/test_pypy_c/test_struct.py
b/pypy/module/pypyjit/test_pypy_c/test_struct.py
--- a/pypy/module/pypyjit/test_pypy_c/test_struct.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_struct.py
@@ -181,13 +181,15 @@
loop, = log.loops_by_filename(self.filepath)
assert loop.match_by_id('pack_into', """\
guard_not_invalidated(descr=...)
- p66 = getfield_gc_r(p14, descr=<FieldP
pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst_data \d+>)
- i67 = getfield_gc_i(p66, descr=<FieldS list.length \d+>)
- i69 = int_sub(i67, 4)
- i71 = int_lt(i69, 2)
- guard_false(i71, descr=...)
- i73 = int_le(i60, 32767)
- guard_true(i73, descr=...)
- p74 = getfield_gc_r(p66, descr=<FieldP list.items \d+>)
- gc_store_indexed(p74, 4, i60, 1, _, 2, descr=<ArrayS 2>)
+ p68 = getfield_gc_r(p14, descr=<FieldP
pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__data \d+>)
+ i69 = getfield_gc_i(p68, descr=<FieldS list.length \d+>)
+ i70 = getfield_gc_i(p14, descr=<FieldS
pypy.objspace.std.bytearrayobject.W_BytearrayObject.inst__offset \d+>)
+ i71 = int_sub(i69, i70)
+ i73 = int_sub(i71, 4)
+ i75 = int_lt(i73, 2)
+ guard_false(i75, descr=...)
+ i77 = int_le(i62, 32767)
+ guard_true(i77, descr=...)
+ p78 = getfield_gc_r(p68, descr=<FieldP list.items \d+>)
+ gc_store_indexed(p78, 4, i62, 1, _, 2, descr=<ArrayS 2>)
""")
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit