[pypy-svn] r38517 - pypy/dist/pypy/translator
arigo at codespeak.net
arigo at codespeak.net
Sun Feb 11 20:54:10 CET 2007
Author: arigo
Date: Sun Feb 11 20:54:09 2007
New Revision: 38517
Modified:
pypy/dist/pypy/translator/geninterplevel.py
Log:
Use the official e.match() way of checking for exceptions.
The issubtype() version doesn't work with e.g. old-style exception classes.
Modified: pypy/dist/pypy/translator/geninterplevel.py
==============================================================================
--- pypy/dist/pypy/translator/geninterplevel.py (original)
+++ pypy/dist/pypy/translator/geninterplevel.py Sun Feb 11 20:54:09 2007
@@ -72,7 +72,7 @@
log = py.log.Producer("geninterp")
py.log.setconsumer("geninterp", ansi_log)
-GI_VERSION = '1.1.19' # bump this for substantial changes
+GI_VERSION = '1.1.20' # bump this for substantial changes
# ____________________________________________________________
try:
@@ -1346,12 +1346,11 @@
# which goes to the last err%d_%d label written above.
# Since we only have OperationError, we need to select:
yield "except %s, e:" % (self.nameof(OperationError),)
- yield " e.normalize_exception(space)"
q = "if"
for link in block.exits[1:]:
assert issubclass(link.exitcase, py.builtin.BaseException)
# Exeption classes come unwrapped in link.exitcase
- yield " %s space.is_true(space.issubtype(e.w_type, %s)):" % (q,
+ yield " %s e.match(space, %s):" % (q,
self.nameof(link.exitcase))
q = "elif"
for op in self.gen_link(link, localscope, blocknum, block, {
More information about the Pypy-commit
mailing list