[pypy-commit] pypy py3k: A slightly better error message when an opcode is missing
amauryfa
noreply at buildbot.pypy.org
Wed Oct 12 00:16:36 CEST 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r47951:a0af6c1d5591
Date: 2011-10-11 23:45 +0200
http://bitbucket.org/pypy/pypy/changeset/a0af6c1d5591/
Log: A slightly better error message when an opcode is missing in the
"stack effect" map.
diff --git a/pypy/interpreter/astcompiler/assemble.py b/pypy/interpreter/astcompiler/assemble.py
--- a/pypy/interpreter/astcompiler/assemble.py
+++ b/pypy/interpreter/astcompiler/assemble.py
@@ -660,4 +660,8 @@
try:
return _static_opcode_stack_effects[op]
except KeyError:
- return _stack_effect_computers[op](arg)
+ try:
+ return _stack_effect_computers[op](arg)
+ except KeyError:
+ raise KeyError("Unknown stack effect for %s (%s)" %
+ (ops.opname[op], op))
More information about the pypy-commit
mailing list