Author: Armin Rigo <[email protected]>
Branch: remove-raisingops
Changeset: r84724:f69e5b473d0c
Date: 2016-05-27 10:44 +0200
http://bitbucket.org/pypy/pypy/changeset/f69e5b473d0c/
Log: tweaks
diff --git a/rpython/jit/metainterp/optimizeopt/test/test_optimizebasic.py
b/rpython/jit/metainterp/optimizeopt/test/test_optimizebasic.py
--- a/rpython/jit/metainterp/optimizeopt/test/test_optimizebasic.py
+++ b/rpython/jit/metainterp/optimizeopt/test/test_optimizebasic.py
@@ -4122,21 +4122,6 @@
# ----------
def optimize_strunicode_loop_extradescrs(self, ops, optops):
- class FakeCallInfoCollection:
- def callinfo_for_oopspec(self, oopspecindex):
- calldescrtype = type(LLtypeMixin.strequaldescr)
- effectinfotype =
type(LLtypeMixin.strequaldescr.get_extra_info())
- for value in LLtypeMixin.__dict__.values():
- if isinstance(value, calldescrtype):
- extra = value.get_extra_info()
- if (extra and isinstance(extra, effectinfotype) and
- extra.oopspecindex == oopspecindex):
- # returns 0 for 'func' in this test
- return value, 0
- raise AssertionError("not found: oopspecindex=%d" %
- oopspecindex)
- #
- self.callinfocollection = FakeCallInfoCollection()
self.optimize_strunicode_loop(ops, optops)
def test_str_equal_noop1(self):
diff --git a/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
b/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
--- a/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
+++ b/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
@@ -6697,21 +6697,6 @@
# ----------
def optimize_strunicode_loop_extradescrs(self, ops, optops, preamble):
- class FakeCallInfoCollection:
- def callinfo_for_oopspec(self, oopspecindex):
- calldescrtype = type(LLtypeMixin.strequaldescr)
- effectinfotype =
type(LLtypeMixin.strequaldescr.get_extra_info())
- for value in LLtypeMixin.__dict__.values():
- if isinstance(value, calldescrtype):
- extra = value.get_extra_info()
- if (extra and isinstance(extra, effectinfotype) and
- extra.oopspecindex == oopspecindex):
- # returns 0 for 'func' in this test
- return value, 0
- raise AssertionError("not found: oopspecindex=%d" %
- oopspecindex)
- #
- self.callinfocollection = FakeCallInfoCollection()
self.optimize_strunicode_loop(ops, optops, preamble)
def test_str_equal_noop1(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
@@ -422,21 +422,42 @@
vref_descr = cpu.sizeof(vrefinfo.JIT_VIRTUAL_REF, jit_virtual_ref_vtable)
FUNC = lltype.FuncType([lltype.Signed, lltype.Signed], lltype.Signed)
- ei = EffectInfo([], [], [], [], [], [], EffectInfo.EF_CANNOT_RAISE,
+ ei = EffectInfo([], [], [], [], [], [],
EffectInfo.EF_ELIDABLE_CANNOT_RAISE,
can_invalidate=False,
oopspecindex=EffectInfo.OS_INT_PY_DIV)
int_py_div_descr = cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT, ei)
- ei = EffectInfo([], [], [], [], [], [], EffectInfo.EF_CANNOT_RAISE,
+ ei = EffectInfo([], [], [], [], [], [],
EffectInfo.EF_ELIDABLE_CANNOT_RAISE,
can_invalidate=False,
oopspecindex=EffectInfo.OS_INT_UDIV)
int_udiv_descr = cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT, ei)
- ei = EffectInfo([], [], [], [], [], [], EffectInfo.EF_CANNOT_RAISE,
+ ei = EffectInfo([], [], [], [], [], [],
EffectInfo.EF_ELIDABLE_CANNOT_RAISE,
can_invalidate=False,
oopspecindex=EffectInfo.OS_INT_PY_MOD)
int_py_mod_descr = cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT, ei)
namespace = locals()
+
+class FakeCallInfoCollection:
+ def callinfo_for_oopspec(self, oopspecindex):
+ calldescrtype = type(LLtypeMixin.strequaldescr)
+ effectinfotype = type(LLtypeMixin.strequaldescr.get_extra_info())
+ for value in LLtypeMixin.__dict__.values():
+ if isinstance(value, calldescrtype):
+ extra = value.get_extra_info()
+ if (extra and isinstance(extra, effectinfotype) and
+ extra.oopspecindex == oopspecindex):
+ # returns 0 for 'func' in this test
+ return value, 0
+ raise AssertionError("not found: oopspecindex=%d" %
+ oopspecindex)
+
+ calldescr_udiv = LLtypeMixin.int_udiv_descr
+ #calldescr_umod = LLtypeMixin.int_umod_descr
+
+LLtypeMixin.callinfocollection = FakeCallInfoCollection()
+
+
# ____________________________________________________________
diff --git a/rpython/rlib/jit.py b/rpython/rlib/jit.py
--- a/rpython/rlib/jit.py
+++ b/rpython/rlib/jit.py
@@ -605,6 +605,7 @@
can_never_inline=None, should_unroll_one_iteration=None,
name='jitdriver', check_untranslated=True, vectorize=False,
get_unique_id=None, is_recursive=False):
+ "NOT_RPYTHON"
if greens is not None:
self.greens = greens
self.name = name
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit