[pypy-commit] pypy inline-dict-ops: fix the test
fijal
noreply at buildbot.pypy.org
Wed Jul 6 11:15:00 CEST 2011
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: inline-dict-ops
Changeset: r45361:ee575cebb8e7
Date: 2011-07-06 11:23 +0200
http://bitbucket.org/pypy/pypy/changeset/ee575cebb8e7/
Log: fix the test
diff --git a/pypy/jit/backend/llsupport/llmodel.py b/pypy/jit/backend/llsupport/llmodel.py
--- a/pypy/jit/backend/llsupport/llmodel.py
+++ b/pypy/jit/backend/llsupport/llmodel.py
@@ -305,14 +305,14 @@
ofs, size, _ = self.unpack_arraydescr_size(arraydescr)
ofs += descr.fielddescr.offset
fieldsize = descr.fielddescr.get_field_size(self.translate_support_code)
- ofs = itemindex * size + ofs
+ fullofs = itemindex * size + ofs
# --- start of GC unsafe code (no GC operation!) ---
- items = rffi.ptradd(rffi.cast(rffi.CCHARP, gcref), ofs)
+ items = rffi.ptradd(rffi.cast(rffi.CCHARP, gcref), fullofs)
for STYPE, UTYPE, itemsize in unroll_basic_sizes:
if fieldsize == itemsize:
# XXX signedness
- items = rffi.cast(rffi.CArrayPtr(STYPE), items)
- val = items[0]
+ item = rffi.cast(rffi.CArrayPtr(STYPE), items)
+ val = item[0]
val = rffi.cast(lltype.Signed, val)
# --- end of GC unsafe code ---
return val
diff --git a/pypy/jit/backend/test/runner_test.py b/pypy/jit/backend/test/runner_test.py
--- a/pypy/jit/backend/test/runner_test.py
+++ b/pypy/jit/backend/test/runner_test.py
@@ -892,9 +892,9 @@
self.execute_operation(rop.SETINTERIORFIELD_GC, [a_box, BoxInt(3),
BoxInt(15)],
'void', descr=vdescr)
- i = self.cpu.bh_getinteriorfield_gc_i(a_box.getref_base(), 3, kdescr)
+ i = self.cpu.bh_getinteriorfield_gc_i(a_box.getref_base(), 3, vdescr)
assert i == 15
- self.cpu.bh_setinteriorfield_gc_i(a_box.getref_base(), 3, kdescr, 25)
+ self.cpu.bh_setinteriorfield_gc_i(a_box.getref_base(), 3, vdescr, 25)
r = self.execute_operation(rop.GETINTERIORFIELD_GC, [a_box, BoxInt(3)],
'int', descr=vdescr)
assert r.getint() == 25
More information about the pypy-commit
mailing list