Author: Amaury Forgeot d'Arc <amaur...@gmail.com>
Branch: py3.3
Changeset: r75267:bbb5d74a2b9d
Date: 2015-01-09 09:33 +0100
http://bitbucket.org/pypy/pypy/changeset/bbb5d74a2b9d/

Log:    Fix stack size of MAKE_FUNCTION and MAKE_CLOSURE opcodes, they
        changed with the introduction of __qualname__.

        This should fix test_dis.py

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
@@ -647,10 +647,10 @@
     return 1 - arg
 
 def _compute_MAKE_CLOSURE(arg):
-    return -1 - _num_args(arg) - ((arg >> 16) & 0xFFFF)
+    return -2 - _num_args(arg) - ((arg >> 16) & 0xFFFF)
 
 def _compute_MAKE_FUNCTION(arg):
-    return -_num_args(arg) - ((arg >> 16) & 0xFFFF)
+    return -1 - _num_args(arg) - ((arg >> 16) & 0xFFFF)
 
 def _compute_BUILD_SLICE(arg):
     if arg == 3:
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to