Author: Amaury Forgeot d'Arc <[email protected]>
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))
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to