[pypy-commit] pypy py3.5: Define missing _compute methods in assemble, fix bug of last commit in codegen
raffael_t
pypy.commits at gmail.com
Sat Jun 4 11:58:00 EDT 2016
Author: Raffael Tfirst <raffael.tfirst at gmail.com>
Branch: py3.5
Changeset: r84918:ffef1437c3dc
Date: 2016-06-04 17:57 +0200
http://bitbucket.org/pypy/pypy/changeset/ffef1437c3dc/
Log: Define missing _compute methods in assemble, fix bug of last commit
in codegen
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
@@ -670,9 +670,15 @@
def _compute_BUILD_TUPLE(arg):
return 1 - arg
+def _compute_BUILD_TUPLE_UNPACK(arg):
+ return 1 - arg
+
def _compute_BUILD_LIST(arg):
return 1 - arg
+def _compute_BUILD_LIST_UNPACK(arg):
+ return 1 - arg
+
def _compute_BUILD_SET(arg):
return 1 - arg
@@ -685,6 +691,9 @@
def _compute_BUILD_MAP_UNPACK(arg):
return 1 - arg
+def _compute_BUILD_MAP_UNPACK_WITH_CALL(arg):
+ return 1 - (arg & 0xFF)
+
def _compute_MAKE_CLOSURE(arg):
return -2 - _num_args(arg) - ((arg >> 16) & 0xFFFF)
diff --git a/pypy/interpreter/astcompiler/codegen.py b/pypy/interpreter/astcompiler/codegen.py
--- a/pypy/interpreter/astcompiler/codegen.py
+++ b/pypy/interpreter/astcompiler/codegen.py
@@ -1113,7 +1113,7 @@
nkw = 0
nseen = 0 # the number of positional arguments on the stack
for elt in args:
- if isinstance(elt.func, ast.Starred):
+ if isinstance(elt, ast.Starred):
# A star-arg. If we've seen positional arguments,
# pack the positional arguments into a tuple.
if nseen != 0:
More information about the pypy-commit
mailing list