[pypy-commit] pypy py3k: Remove duplicate implementation of RAISE_VARARGS.

amauryfa noreply at buildbot.pypy.org
Sat Sep 22 13:36:08 CEST 2012


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r57473:4a6cfc86e96a
Date: 2012-09-22 13:35 +0200
http://bitbucket.org/pypy/pypy/changeset/4a6cfc86e96a/

Log:	Remove duplicate implementation of RAISE_VARARGS.

diff --git a/pypy/objspace/flow/flowcontext.py b/pypy/objspace/flow/flowcontext.py
--- a/pypy/objspace/flow/flowcontext.py
+++ b/pypy/objspace/flow/flowcontext.py
@@ -646,36 +646,6 @@
 
     # opcodes removed or heavily changed in python 3
 
-    @jit.unroll_safe
-    def RAISE_VARARGS(self, nbargs, next_instr):
-        space = self.space
-        if nbargs == 0:
-            frame = self
-            ec = self.space.getexecutioncontext()
-            while frame:
-                if frame.last_exception is not None:
-                    operror = ec._convert_exc(frame.last_exception)
-                    break
-                frame = frame.f_backref()
-            else:
-                raise OperationError(space.w_TypeError,
-                    space.wrap("raise: no active exception to re-raise"))
-            # re-raise, no new traceback obj will be attached
-            self.last_exception = operror
-            from pypy.interpreter.pyopcode import Reraise
-            raise Reraise
-
-        w_value = w_traceback = space.w_None
-        if nbargs >= 3:
-            w_traceback = self.popvalue()
-        if nbargs >= 2:
-            w_value = self.popvalue()
-        if 1:
-            w_type = self.popvalue()
-        operror = OperationError(w_type, w_value)
-        operror.normalize_exception(space)
-        raise operror
-
     def slice(self, w_start, w_end):
         w_obj = self.popvalue()
         w_result = self.space.getslice(w_obj, w_start, w_end)


More information about the pypy-commit mailing list