[pypy-commit] pypy py3k: Add stack effect for new opcodes

amauryfa noreply at buildbot.pypy.org
Tue Oct 18 01:04:26 CEST 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r48176:b14ef64468e2
Date: 2011-10-18 01:03 +0200
http://bitbucket.org/pypy/pypy/changeset/b14ef64468e2/

Log:	Add stack effect for new opcodes

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
@@ -544,6 +544,7 @@
     ops.LOAD_BUILD_CLASS : 1,
     ops.STORE_LOCALS : -1,
     ops.POP_BLOCK : 0,
+    ops.POP_EXCEPT : 0,
     ops.END_FINALLY : -3,
     ops.SETUP_WITH : 1,
     ops.SETUP_FINALLY : 0,
@@ -572,6 +573,7 @@
     ops.LOAD_GLOBAL : 1,
     ops.STORE_GLOBAL : -1,
     ops.DELETE_GLOBAL : 0,
+    ops.DELETE_DEREF : 0,
 
     ops.LOAD_CLOSURE : 1,
     ops.LOAD_DEREF : 1,
@@ -595,6 +597,9 @@
 def _compute_UNPACK_SEQUENCE(arg):
     return arg + 1
 
+def _compute_UNPACK_EX(arg):
+    return (arg % 256) + (arg // 256)
+
 def _compute_BUILD_TUPLE(arg):
     return 1 - arg
 


More information about the pypy-commit mailing list