Author: Carl Friedrich Bolz <[email protected]>
Branch:
Changeset: r44528:bdcc660412a1
Date: 2011-05-27 09:40 +0200
http://bitbucket.org/pypy/pypy/changeset/bdcc660412a1/
Log: kill more remnants of resume points
diff --git a/pypy/jit/codewriter/jtransform.py
b/pypy/jit/codewriter/jtransform.py
--- a/pypy/jit/codewriter/jtransform.py
+++ b/pypy/jit/codewriter/jtransform.py
@@ -209,7 +209,6 @@
def rewrite_op_cast_int_to_unichar(self, op): pass
def rewrite_op_cast_int_to_uint(self, op): pass
def rewrite_op_cast_uint_to_int(self, op): pass
- def rewrite_op_resume_point(self, op): pass
def _rewrite_symmetric(self, op):
"""Rewrite 'c1+v2' into 'v2+c1' in an attempt to avoid generating
diff --git a/pypy/rpython/llinterp.py b/pypy/rpython/llinterp.py
--- a/pypy/rpython/llinterp.py
+++ b/pypy/rpython/llinterp.py
@@ -563,15 +563,6 @@
def op_hint(self, x, hints):
return x
- def op_resume_point(self, *args):
- pass
-
- def op_resume_state_create(self, *args):
- raise RuntimeError("resume_state_create can not be called.")
-
- def op_resume_state_invoke(self, *args):
- raise RuntimeError("resume_state_invoke can not be called.")
-
def op_decode_arg(self, fname, i, name, vargs, vkwds):
raise NotImplementedError("decode_arg")
diff --git a/pypy/rpython/lltypesystem/lloperation.py
b/pypy/rpython/lltypesystem/lloperation.py
--- a/pypy/rpython/lltypesystem/lloperation.py
+++ b/pypy/rpython/lltypesystem/lloperation.py
@@ -521,10 +521,6 @@
RuntimeError)),
# can always unwind, not just if stackless gc
- 'resume_point': LLOp(canraise=(Exception,)),
- 'resume_state_create': LLOp(canraise=(MemoryError,), canunwindgc=True),
- 'resume_state_invoke': LLOp(canraise=(Exception, StackException,
- RuntimeError)),
'stack_frames_depth': LLOp(sideeffects=False, canraise=(StackException,
RuntimeError)),
'stack_switch': LLOp(canraise=(StackException, RuntimeError)),
diff --git a/pypy/translator/backendopt/inline.py
b/pypy/translator/backendopt/inline.py
--- a/pypy/translator/backendopt/inline.py
+++ b/pypy/translator/backendopt/inline.py
@@ -541,7 +541,6 @@
'cast_pointer': 0,
'malloc': 2,
'yield_current_frame_to_caller': sys.maxint, # XXX bit extreme
- 'resume_point': sys.maxint, # XXX bit extreme
'instrument_count': 0,
'debug_assert': -1,
}
diff --git a/pypy/translator/backendopt/removenoops.py
b/pypy/translator/backendopt/removenoops.py
--- a/pypy/translator/backendopt/removenoops.py
+++ b/pypy/translator/backendopt/removenoops.py
@@ -81,8 +81,6 @@
num_removed += 1
else:
available[key] = op.result
- elif op.opname == 'resume_point':
- available.clear()
if num_removed:
remove_same_as(graph)
# remove casts with unused results
diff --git a/pypy/translator/cli/opcodes.py b/pypy/translator/cli/opcodes.py
--- a/pypy/translator/cli/opcodes.py
+++ b/pypy/translator/cli/opcodes.py
@@ -77,7 +77,6 @@
'cast_ptr_to_weakadr': [PushAllArgs, 'newobj instance void class
%s::.ctor(object)' % WEAKREF],
'gc__collect': 'call void class
[mscorlib]System.GC::Collect()',
'gc_set_max_heap_size': Ignore,
- 'resume_point': Ignore,
'debug_assert': Ignore,
'debug_start_traceback': Ignore,
'debug_record_traceback': Ignore,
diff --git a/pypy/translator/jvm/opcodes.py b/pypy/translator/jvm/opcodes.py
--- a/pypy/translator/jvm/opcodes.py
+++ b/pypy/translator/jvm/opcodes.py
@@ -95,7 +95,6 @@
'gc__collect': jvm.SYSTEMGC,
'gc_set_max_heap_size': Ignore,
- 'resume_point': Ignore,
'jit_marker': Ignore,
'jit_force_virtualizable': Ignore,
'jit_force_virtual': DoNothing,
diff --git a/pypy/translator/oosupport/test_template/operations.py
b/pypy/translator/oosupport/test_template/operations.py
--- a/pypy/translator/oosupport/test_template/operations.py
+++ b/pypy/translator/oosupport/test_template/operations.py
@@ -107,12 +107,6 @@
return res
assert self.interpret(fn, [sys.maxint, 2]) == 1
- def test_ignore_resume_point(self):
- def fn(x):
- rstack.resume_point('hello world', x)
- return x
- assert self.interpret(fn, [42]) == 42
-
def test_rshift(self):
def fn(x, y):
return x >> y
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit