Author: Ronan Lamy <[email protected]>
Branch: translation-cleanup
Changeset: r57428:d8025c2ffefc
Date: 2012-09-16 04:55 +0100
http://bitbucket.org/pypy/pypy/changeset/d8025c2ffefc/
Log: Flowspacify 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
@@ -480,6 +480,28 @@
next_instr = block.handle(self, unroller)
return next_instr
+ def RAISE_VARARGS(self, nbargs, next_instr):
+ space = self.space
+ if nbargs == 0:
+ if self.last_exception is not None:
+ operror = self._convert_exc(self.last_exception)
+ self.last_exception = operror
+ raise Reraise
+ else:
+ raise OperationError(space.w_TypeError,
+ space.wrap("raise: no active exception to re-raise"))
+
+ 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 IMPORT_NAME(self, nameindex, next_instr):
space = self.space
modulename = self.getname_u(nameindex)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit