Author: Ronan Lamy <[email protected]>
Branch: py3.6-asyncgen
Changeset: r97735:43827ffdbe61
Date: 2019-10-07 19:31 +0100
http://bitbucket.org/pypy/pypy/changeset/43827ffdbe61/
Log: Remove unused argument in_generator from execute_frame()
diff --git a/pypy/interpreter/generator.py b/pypy/interpreter/generator.py
--- a/pypy/interpreter/generator.py
+++ b/pypy/interpreter/generator.py
@@ -125,7 +125,7 @@
self.KIND)
self.running = True
try:
- w_result = frame.execute_frame(self, w_arg_or_err)
+ w_result = frame.execute_frame(w_arg_or_err)
except OperationError as e:
# errors finish a frame
try:
diff --git a/pypy/interpreter/pyframe.py b/pypy/interpreter/pyframe.py
--- a/pypy/interpreter/pyframe.py
+++ b/pypy/interpreter/pyframe.py
@@ -351,9 +351,9 @@
else:
return r_uint(0)
- def execute_frame(self, in_generator=None, w_arg_or_err=None):
+ def execute_frame(self, w_arg_or_err=None):
"""Execute this frame. Main entry point to the interpreter.
- 'in_generator' is non-None iff we are starting or resuming
+ 'w_arg_or_err' is non-None iff we are starting or resuming
a generator or coroutine frame; in that case, w_arg_or_err
is the input argument -or- an SApplicationException instance.
"""
@@ -375,7 +375,7 @@
# the YIELD_VALUE/YIELD_FROM instruction.
try:
try:
- if in_generator is None:
+ if w_arg_or_err is None:
assert self.last_instr == -1
next_instr = r_uint(0)
else:
diff --git a/pypy/interpreter/pyopcode.py b/pypy/interpreter/pyopcode.py
--- a/pypy/interpreter/pyopcode.py
+++ b/pypy/interpreter/pyopcode.py
@@ -1151,8 +1151,8 @@
def YIELD_FROM(self, oparg, next_instr):
# Unlike CPython, we handle this not by repeating the same
# bytecode over and over until the inner iterator is exhausted.
- # Instead, we directly set the generator's w_yielded_from.
- # This asks generator.resume_execute_frame() to exhaust that
+ # Instead, we set w_yielding_from.
+ # This asks resume_execute_frame() to exhaust that
# sub-iterable first before continuing on the next bytecode.
w_inputvalue = self.popvalue() # that's always w_None, actually
w_gen = self.popvalue()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit