[pypy-svn] r28532 - in pypy/dist/pypy/translator/cli: . test
antocuni at codespeak.net
antocuni at codespeak.net
Thu Jun 8 17:09:00 CEST 2006
Author: antocuni
Date: Thu Jun 8 17:08:59 2006
New Revision: 28532
Added:
pypy/dist/pypy/translator/cli/test/test_exception.py (contents, props changed)
Modified:
pypy/dist/pypy/translator/cli/function.py
Log:
Fixed a bug in exception handling; added the corresponding test.
Modified: pypy/dist/pypy/translator/cli/function.py
==============================================================================
--- pypy/dist/pypy/translator/cli/function.py (original)
+++ pypy/dist/pypy/translator/cli/function.py Thu Jun 8 17:08:59 2006
@@ -115,8 +115,8 @@
assert len(target.inputargs) == 2
self.store(link.target.inputargs[1])
else:
- # pop the unused exception value
- self.ilasm.opcode('pop')
+ # the exception value is on the stack, store it in the proper place
+ self.store(link.last_exc_value)
self._setup_link(link)
target_label = self._get_block_name(target)
Added: pypy/dist/pypy/translator/cli/test/test_exception.py
==============================================================================
--- (empty file)
+++ pypy/dist/pypy/translator/cli/test/test_exception.py Thu Jun 8 17:08:59 2006
@@ -0,0 +1,6 @@
+import py
+from pypy.translator.cli.test.runtest import CliTest
+from pypy.rpython.test.test_exception import BaseTestException
+
+class TestCliException(CliTest, BaseTestException):
+ pass
More information about the Pypy-commit
mailing list