[pypy-commit] pypy default: fix the test
fijal
noreply at buildbot.pypy.org
Thu Jul 21 18:14:54 CEST 2011
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r45831:531879ba26f2
Date: 2011-07-21 18:14 +0200
http://bitbucket.org/pypy/pypy/changeset/531879ba26f2/
Log: fix the test
diff --git a/pypy/jit/metainterp/test/test_ajit.py b/pypy/jit/metainterp/test/test_ajit.py
--- a/pypy/jit/metainterp/test/test_ajit.py
+++ b/pypy/jit/metainterp/test/test_ajit.py
@@ -2591,7 +2591,7 @@
def test_jit_merge_point_with_raw_pointer(self):
driver = JitDriver(greens = [], reds = ['n', 'x'])
- TP = lltype.Array(lltype.Signed)
+ TP = lltype.Array(lltype.Signed, hints={'nolength': True})
def f(n):
x = lltype.malloc(TP, 10, flavor='raw')
diff --git a/pypy/jit/metainterp/warmstate.py b/pypy/jit/metainterp/warmstate.py
--- a/pypy/jit/metainterp/warmstate.py
+++ b/pypy/jit/metainterp/warmstate.py
@@ -138,6 +138,9 @@
refvalue = cpu.ts.cast_to_ref(value)
cpu.set_future_value_ref(j, refvalue)
elif typecode == 'int':
+ if isinstance(lltype.typeOf(value), lltype.Ptr):
+ intvalue = llmemory.AddressAsInt(llmemory.cast_ptr_to_adr(value))
+ else:
intvalue = lltype.cast_primitive(lltype.Signed, value)
cpu.set_future_value_int(j, intvalue)
elif typecode == 'float':
More information about the pypy-commit
mailing list