New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:

Currently dis.stack_effect() doesn't support opcodes NOP and EXTENDED_ARG. NOP 
is never emitted by the standard compiler (it is temporary added in the 
peephole optimizer, but later it is removed). EXTENDED_ARG is a special case, 
it is considered as a part of long instructions.

dis.stack_effect() itself is not used in the dis module. It can be used in the 
third-party code, and the third-party code can produce bytecode with 
non-standard use of NOP and EXTENDED_ARG. Supporting them in dis.stack_effect() 
can avoid the need of special casing them in the third-party code.

I don't know whether this is a bug fix or a new feature.

----------
components: Library (Lib)
messages: 315622
nosy: larry, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Add support of NOP and EXTENDED_ARG in stack_effect()
versions: Python 3.8

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

Reply via email to