Author: Maciej Fijalkowski <[email protected]>
Branch: optresult-unroll
Changeset: r79255:033eed71b734
Date: 2015-08-27 14:25 +0200
http://bitbucket.org/pypy/pypy/changeset/033eed71b734/
Log: fix some tests in test_recursive
diff --git a/rpython/jit/metainterp/history.py
b/rpython/jit/metainterp/history.py
--- a/rpython/jit/metainterp/history.py
+++ b/rpython/jit/metainterp/history.py
@@ -770,6 +770,12 @@
if 'call_pure' in check:
assert check.pop('call_pure') == 0
check['call_pure_i'] = check['call_pure_r'] = check['call_pure_f']
= 0
+ if 'call_may_force' in check:
+ assert check.pop('call_may_force') == 0
+ check['call_may_force_i'] = check['call_may_force_r'] =
check['call_may_force_f'] = check['call_may_force_n'] = 0
+ if 'call_assembler' in check:
+ assert check.pop('call_assembler') == 0
+ check['call_assembler_i'] = check['call_assembler_r'] =
check['call_assembler_f'] = check['call_assembler_n'] = 0
for loop in self.get_all_loops():
insns = loop.summary(adding_insns=insns, omit_finish=omit_finish)
return self._check_insns(insns, expected, check)
diff --git a/rpython/jit/metainterp/test/test_recursive.py
b/rpython/jit/metainterp/test/test_recursive.py
--- a/rpython/jit/metainterp/test/test_recursive.py
+++ b/rpython/jit/metainterp/test/test_recursive.py
@@ -144,10 +144,10 @@
f = self.get_interpreter(codes)
assert self.meta_interp(f, [0, 0, 0], enable_opts='') == 42
- self.check_resops(call_may_force=1, int_add=1, call=0)
+ self.check_resops(call_may_force_i=1, int_add=1, call=0)
assert self.meta_interp(f, [0, 0, 0], enable_opts='',
inline=True) == 42
- self.check_resops(call=0, int_add=2, call_may_force=0,
+ self.check_resops(call=0, int_add=2, call_may_force_i=0,
guard_no_exception=0)
def test_inline_jitdriver_check(self):
@@ -490,7 +490,7 @@
return loop(100)
res = self.meta_interp(main, [0], enable_opts='',
trace_limit=TRACE_LIMIT)
- self.check_resops(call=0, call_may_force=1)
+ self.check_resops(call=0, call_may_force_i=1)
res = self.meta_interp(main, [1], enable_opts='',
trace_limit=TRACE_LIMIT)
self.check_resops(call=0, call_may_force=0)
@@ -575,7 +575,7 @@
result += f('-c-----------l-', i+100)
self.meta_interp(g, [10], backendopt=True)
self.check_aborted_count(1)
- self.check_resops(call=0, call_assembler=2)
+ self.check_resops(call=0, call_assembler_i=2)
self.check_jitcell_token_count(2)
def test_directly_call_assembler(self):
@@ -624,7 +624,7 @@
try:
compile.compile_tmp_callback = my_ctc
self.meta_interp(portal, [2, 5], inline=True)
- self.check_resops(call_may_force=0, call_assembler=2)
+ self.check_resops(call_may_force=0, call_assembler_n=2)
finally:
compile.compile_tmp_callback = original_ctc
# check that we made a temporary callback
@@ -679,7 +679,7 @@
try:
compile.compile_tmp_callback = my_ctc
self.meta_interp(main, [2, 5], inline=True)
- self.check_resops(call_may_force=0, call_assembler=2)
+ self.check_resops(call_may_force=0, call_assembler_n=2)
finally:
compile.compile_tmp_callback = original_ctc
# check that we made a temporary callback
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit