Author: Maciej Fijalkowski <[email protected]>
Branch: improve-consecutive-dict-lookups
Changeset: r70100:89278beb6037
Date: 2014-03-19 22:37 +0200
http://bitbucket.org/pypy/pypy/changeset/89278beb6037/
Log: fix some tests
diff --git a/rpython/jit/codewriter/test/test_jtransform.py
b/rpython/jit/codewriter/test/test_jtransform.py
--- a/rpython/jit/codewriter/test/test_jtransform.py
+++ b/rpython/jit/codewriter/test/test_jtransform.py
@@ -60,7 +60,8 @@
class FakeResidualCallControl:
def guess_call_kind(self, op):
return 'residual'
- def getcalldescr(self, op, oopspecindex=None, extraeffect=None):
+ def getcalldescr(self, op, oopspecindex=None, extraeffect=None,
+ extradescr=None):
return 'calldescr'
def calldescr_canraise(self, calldescr):
return True
@@ -117,7 +118,8 @@
self.callinfocollection = FakeCallInfoCollection()
def guess_call_kind(self, op):
return 'builtin'
- def getcalldescr(self, op, oopspecindex=None, extraeffect=None):
+ def getcalldescr(self, op, oopspecindex=None, extraeffect=None,
+ extradescr=None):
assert oopspecindex is not None # in this test
EI = effectinfo.EffectInfo
if oopspecindex != EI.OS_ARRAYCOPY:
diff --git a/rpython/jit/codewriter/test/test_list.py
b/rpython/jit/codewriter/test/test_list.py
--- a/rpython/jit/codewriter/test/test_list.py
+++ b/rpython/jit/codewriter/test/test_list.py
@@ -37,7 +37,8 @@
class FakeCallControl:
class getcalldescr(AbstractDescr):
- def __init__(self, op, oopspecindex=0, extraeffect=None):
+ def __init__(self, op, oopspecindex=0, extraeffect=None,
+ extradescr=None):
self.op = op
self.oopspecindex = oopspecindex
def __repr__(self):
diff --git a/rpython/jit/metainterp/optimizeopt/test/test_util.py
b/rpython/jit/metainterp/optimizeopt/test/test_util.py
--- a/rpython/jit/metainterp/optimizeopt/test/test_util.py
+++ b/rpython/jit/metainterp/optimizeopt/test/test_util.py
@@ -181,28 +181,29 @@
plaincalldescr = cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT,
EffectInfo.MOST_GENERAL)
nonwritedescr = cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT,
- EffectInfo([], [], [], []))
+ EffectInfo([], [], [], [], [], []))
writeadescr = cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT,
- EffectInfo([], [], [adescr], []))
+ EffectInfo([], [], [adescr], [], [], []))
writearraydescr = cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT,
- EffectInfo([], [], [adescr], [arraydescr]))
+ EffectInfo([], [], [adescr], [arraydescr],
+ [], []))
readadescr = cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT,
- EffectInfo([adescr], [], [], []))
+ EffectInfo([adescr], [], [], [], [], []))
mayforcevirtdescr = cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT,
- EffectInfo([nextdescr], [], [], [],
+ EffectInfo([nextdescr], [], [], [], [], [],
EffectInfo.EF_FORCES_VIRTUAL_OR_VIRTUALIZABLE,
can_invalidate=True))
arraycopydescr = cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT,
- EffectInfo([], [arraydescr], [], [arraydescr],
+ EffectInfo([], [arraydescr], [], [arraydescr], [], [],
EffectInfo.EF_CANNOT_RAISE,
oopspecindex=EffectInfo.OS_ARRAYCOPY))
raw_malloc_descr = cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT,
- EffectInfo([], [], [], [],
+ EffectInfo([], [], [], [], [], [],
EffectInfo.EF_CAN_RAISE,
oopspecindex=EffectInfo.OS_RAW_MALLOC_VARSIZE_CHAR))
raw_free_descr = cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT,
- EffectInfo([], [], [], [],
+ EffectInfo([], [], [], [], [], [],
EffectInfo.EF_CANNOT_RAISE,
oopspecindex=EffectInfo.OS_RAW_FREE))
@@ -251,17 +252,18 @@
_oopspecindex = getattr(EffectInfo, _os)
locals()[_name] = \
cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT,
- EffectInfo([], [], [], [], EffectInfo.EF_CANNOT_RAISE,
+ EffectInfo([], [], [], [], [], [], EffectInfo.EF_CANNOT_RAISE,
oopspecindex=_oopspecindex))
#
_oopspecindex = getattr(EffectInfo, _os.replace('STR', 'UNI'))
locals()[_name.replace('str', 'unicode')] = \
cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT,
- EffectInfo([], [], [], [], EffectInfo.EF_CANNOT_RAISE,
+ EffectInfo([], [], [], [], [], [], EffectInfo.EF_CANNOT_RAISE,
oopspecindex=_oopspecindex))
s2u_descr = cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT,
- EffectInfo([], [], [], [], oopspecindex=EffectInfo.OS_STR2UNICODE))
+ EffectInfo([], [], [], [], [], [],
+ oopspecindex=EffectInfo.OS_STR2UNICODE))
#
class LoopToken(AbstractDescr):
@@ -277,7 +279,7 @@
virtualtokendescr = vrefinfo.descr_virtual_token
virtualforceddescr = vrefinfo.descr_forced
FUNC = lltype.FuncType([], lltype.Void)
- ei = EffectInfo([], [], [], [], EffectInfo.EF_CANNOT_RAISE,
+ ei = EffectInfo([], [], [], [], [], [], EffectInfo.EF_CANNOT_RAISE,
can_invalidate=False,
oopspecindex=EffectInfo.OS_JIT_FORCE_VIRTUALIZABLE)
clear_vable = cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT, ei)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit