[pypy-commit] pypy conditional_call_value_3: tweak the test
arigo
pypy.commits at gmail.com
Mon Sep 12 08:07:28 EDT 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: conditional_call_value_3
Changeset: r87036:6ba9f0326d65
Date: 2016-09-12 13:57 +0200
http://bitbucket.org/pypy/pypy/changeset/6ba9f0326d65/
Log: tweak the test
diff --git a/rpython/jit/backend/test/test_ll_random.py b/rpython/jit/backend/test/test_ll_random.py
--- a/rpython/jit/backend/test/test_ll_random.py
+++ b/rpython/jit/backend/test/test_ll_random.py
@@ -709,12 +709,14 @@
builder.loop.operations.append(op)
# 6. a conditional call (for now always with no exception raised)
-class BaseCondCallOperation(BaseCallOperation):
+class CondCallOperation(BaseCallOperation):
def produce_into(self, builder, r):
fail_subset = builder.subset_of_intvars(r)
if self.opnum == rop.COND_CALL:
+ RESULT_TYPE = lltype.Void
v_cond = builder.get_bool_var(r)
else:
+ RESULT_TYPE = lltype.Signed
v_cond = r.choice(builder.intvars)
subset = builder.subset_of_intvars(r)[:4]
for i in range(len(subset)):
@@ -727,10 +729,10 @@
seen.append(args)
else:
assert seen[0] == args
- if self.RESULT_TYPE is lltype.Signed:
+ if RESULT_TYPE is lltype.Signed:
return len(args) - 42000
#
- TP = lltype.FuncType([lltype.Signed] * len(subset), self.RESULT_TYPE)
+ TP = lltype.FuncType([lltype.Signed] * len(subset), RESULT_TYPE)
ptr = llhelper(lltype.Ptr(TP), call_me)
c_addr = ConstAddr(llmemory.cast_ptr_to_adr(ptr), builder.cpu)
args = [v_cond, c_addr] + subset
@@ -741,14 +743,6 @@
op.setfailargs(fail_subset)
builder.loop.operations.append(op)
-class CondCallOperation(BaseCondCallOperation):
- RESULT_TYPE = lltype.Void
- opnum = rop.COND_CALL
-
-class CondCallValueOperation(BaseCondCallOperation):
- RESULT_TYPE = lltype.Signed
- opnum = rop.COND_CALL_VALUE_I
-
# ____________________________________________________________
OPERATIONS = test_random.OPERATIONS[:]
More information about the pypy-commit
mailing list