diff options
author | Mark Shannon <mark@hotpy.org> | 2022-01-20 11:46:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 11:46:39 (GMT) |
commit | b04dfbbe4bd7071d46c8688c2263726ea31d33cd (patch) | |
tree | 17989daaffa384df343b53289845fba667e20acc /Lib/test/test_sys.py | |
parent | d05a66339b5e07d72d96e4c30a34cc3821bb61a2 (diff) | |
download | cpython-b04dfbbe4bd7071d46c8688c2263726ea31d33cd.zip cpython-b04dfbbe4bd7071d46c8688c2263726ea31d33cd.tar.gz cpython-b04dfbbe4bd7071d46c8688c2263726ea31d33cd.tar.bz2 |
bpo-46409: Make generators in bytecode (GH-30633)
* Add RETURN_GENERATOR and JUMP_NO_INTERRUPT opcodes.
* Trim frame and generator by word each.
* Minor refactor of frame.c
* Update test.test_sys to account for smaller frames.
* Treat generator functions as normal functions when evaluating and specializing.
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r-- | Lib/test/test_sys.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 2c8c6ab..accd35e 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -1386,7 +1386,7 @@ class SizeofTest(unittest.TestCase): def func(): return sys._getframe() x = func() - check(x, size('3Pi3c8P2ic?P')) + check(x, size('3Pi3c7P2ic??P')) # function def func(): pass check(func, size('14Pi')) @@ -1403,7 +1403,7 @@ class SizeofTest(unittest.TestCase): check(bar, size('PP')) # generator def get_gen(): yield 1 - check(get_gen(), size('P2P4P4c8P2ic?P')) + check(get_gen(), size('P2P4P4c7P2ic??P')) # iterator check(iter('abc'), size('lP')) # callable-iterator |