[pypy-commit] pypy default: removed my hack, use filter instead (thx armin)
plan_rich
pypy.commits at gmail.com
Wed Sep 21 13:21:20 EDT 2016
Author: Richard Plangger <planrichi at gmail.com>
Branch:
Changeset: r87282:9310b8a0e6fa
Date: 2016-09-21 19:20 +0200
http://bitbucket.org/pypy/pypy/changeset/9310b8a0e6fa/
Log: removed my hack, use filter instead (thx armin)
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
@@ -710,6 +710,12 @@
# 6. a conditional call (for now always with no exception raised)
class CondCallOperation(BaseCallOperation):
+
+ def filter(self, builder):
+ if not builder.cpu.supports_cond_call_value and \
+ self.opnum == rop.COND_CALL_VALUE_I:
+ raise CannotProduceOperation
+
def produce_into(self, builder, r):
fail_subset = builder.subset_of_intvars(r)
if self.opnum == rop.COND_CALL:
diff --git a/rpython/jit/backend/test/zll_stress.py b/rpython/jit/backend/test/zll_stress.py
--- a/rpython/jit/backend/test/zll_stress.py
+++ b/rpython/jit/backend/test/zll_stress.py
@@ -19,14 +19,6 @@
cpu.setup_once()
r = Random()
r.jumpahead(piece*99999999)
- OPERATIONS = LLtypeOperationBuilder.OPERATIONS[:]
- if not cpu.supports_cond_call_value:
- # remove COND_CALL_VALUE_I if the cpu does not support it
- ops = LLtypeOperationBuilder.OPERATIONS
- LLtypeOperationBuilder.OPERATIONS = [op for op in ops \
- if op.opnum != rop.COND_CALL_VALUE_I]
for i in range(piece*per_piece, (piece+1)*per_piece):
print " i = %d; r.setstate(%s)" % (i, r.getstate())
check_random_function(cpu, LLtypeOperationBuilder, r, i, total_iterations)
- # restore the old list
- LLtypeOperationBuilder.OPERATIONS = OPERATIONS
More information about the pypy-commit
mailing list