New submission from Mark Shannon:

The handling of "pseudo exceptions" (return, break and continue) are currently 
handled in the interpreter. This make the interpreter loop more complex and 
slower than it needs to be. This change moves the handling of pseudo exceptions 
into the compiler. 

The net effects of this patch are:

Simpler interpreter loop: no 'psuedo-exceptions', fewer bytecodes and some 
simplifed bytecodes.

Eliminate the 'why_code' state variable in the  interpreter. Execution is 
always in the 'normal' state except during explicit exception handling.

Small increase in size and complexity of compiler.

Speedup of 1.5% (Intel i7); this should be considered a happy side-effect 
rather than a motivation for the change.

----------
hgrepos: 181
messages: 185741
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Move unwinding of stack for "pseudo exceptions" from interpreter to 
compiler.

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17611>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to