[issue13897] Move fields relevant to coroutine/generators out of frame into generator/threadstate

Mark Shannon report at bugs.python.org
Sat Jan 28 17:24:48 CET 2012


New submission from Mark Shannon <mark at hotpy.org>:

The frame object has a number of fields which belong to the generator object.
By creating a CoState struct, these fields can be moved to generator/threadstate where they belong.

The interpreter no longer has to swap around exception state whenever generators are entered/exited.
The frame object is made more compact, reducing allocation/deallocation overhead (although benchmarking showed no significant difference) 

The attached patch reduces the code base by about 50 LOC overall.

----------
components: Interpreter Core
files: coro.patch
keywords: patch
messages: 152167
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Move fields relevant to coroutine/generators out of frame into generator/threadstate
type: enhancement
versions: Python 3.3
Added file: http://bugs.python.org/file24350/coro.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13897>
_______________________________________


More information about the Python-bugs-list mailing list