]> granicus.if.org Git - python/commit
bpo-33041: Rework compiling an "async for" loop. (#6142)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 23 Mar 2018 12:34:35 +0000 (14:34 +0200)
committerGitHub <noreply@github.com>
Fri, 23 Mar 2018 12:34:35 +0000 (14:34 +0200)
commit702f8f3611bc49b73772cce2b9b041bd11ff9b35
treef712f53a42dc54831e7daf7e3686bc9c875b37b3
parentc65bf3fe4a2bde424b79e350f36b7aaa3f6476f6
bpo-33041: Rework compiling an "async for" loop. (#6142)

* Added new opcode END_ASYNC_FOR.
* Setting global StopAsyncIteration no longer breaks "async for" loops.
* Jumping into an "async for" loop is now disabled.
* Jumping out of an "async for" loop no longer corrupts the stack.
* Simplify the compiler.
14 files changed:
Doc/library/dis.rst
Doc/whatsnew/3.8.rst
Include/opcode.h
Lib/importlib/_bootstrap_external.py
Lib/opcode.py
Lib/test/test_coroutines.py
Lib/test/test_dis.py
Lib/test/test_sys_settrace.py
Misc/NEWS.d/next/Core and Builtins/2018-03-18-13-56-14.bpo-33041.XwPhI2.rst [new file with mode: 0644]
Objects/frameobject.c
Python/ceval.c
Python/compile.c
Python/importlib_external.h
Python/opcode_targets.h