[pypy-commit] pypy ffi-backend: Fix more tests
arigo
noreply at buildbot.pypy.org
Tue Aug 7 15:56:53 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch: ffi-backend
Changeset: r56634:9a6abc9d085a
Date: 2012-08-07 15:24 +0200
http://bitbucket.org/pypy/pypy/changeset/9a6abc9d085a/
Log: Fix more tests
diff --git a/pypy/jit/backend/llsupport/ffisupport.py b/pypy/jit/backend/llsupport/ffisupport.py
--- a/pypy/jit/backend/llsupport/ffisupport.py
+++ b/pypy/jit/backend/llsupport/ffisupport.py
@@ -83,6 +83,7 @@
def calldescr_dynamic_for_tests(cpu, atypes, rtype, abiname='FFI_DEFAULT_ABI'):
from pypy.rlib import clibffi
from pypy.rlib.jit_libffi import CIF_DESCRIPTION, FFI_TYPE_PP
+ from pypy.jit.codewriter.effectinfo import EffectInfo
#
p = lltype.malloc(CIF_DESCRIPTION, len(atypes),
flavor='raw', immortal=True)
@@ -93,4 +94,4 @@
flavor='raw', immortal=True)
for i in range(len(atypes)):
p.atypes[i] = atypes[i]
- return cpu.calldescrof_dynamic(p, None)
+ return cpu.calldescrof_dynamic(p, EffectInfo.MOST_GENERAL)
diff --git a/pypy/jit/backend/llsupport/test/test_ffisupport.py b/pypy/jit/backend/llsupport/test/test_ffisupport.py
--- a/pypy/jit/backend/llsupport/test/test_ffisupport.py
+++ b/pypy/jit/backend/llsupport/test/test_ffisupport.py
@@ -13,6 +13,8 @@
self.supports_floats = supports_floats
self.supports_longlong = supports_longlong
self.supports_singlefloats = supports_singlefloats
+ def calldescrof_dynamic(self, cif_descr, effectinfo):
+ return get_call_descr_dynamic(self, cif_descr, effectinfo)
def test_call_descr_dynamic():
args = [types.sint, types.pointer]
diff --git a/pypy/jit/backend/x86/test/test_runner.py b/pypy/jit/backend/x86/test/test_runner.py
--- a/pypy/jit/backend/x86/test/test_runner.py
+++ b/pypy/jit/backend/x86/test/test_runner.py
@@ -458,10 +458,8 @@
mc.RET16_i(40)
rawstart = mc.materialize(cpu.asmmemmgr, [])
#
- calldescr = cpu.calldescrof_dynamic([types.slong] * 10,
- types.slong,
- EffectInfo.MOST_GENERAL,
- ffi_flags=-1)
+ calldescr = cpu._calldescr_dynamic_for_tests([types.slong] * 10,
+ types.slong)
calldescr.get_call_conv = lambda: ffi # <==== hack
# ^^^ we patch get_call_conv() so that the test also makes sense
# on Linux, because clibffi.get_call_conv() would always
More information about the pypy-commit
mailing list