classification
Title: Add support of NOP and EXTENDED_ARG in stack_effect()
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: larry, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2018-04-22 17:11 by serhiy.storchaka, last changed 2018-04-25 19:06 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 6566 merged serhiy.storchaka, 2018-04-22 17:25
Messages (2)
msg315622 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-04-22 17:11
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.
msg315758 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-04-25 19:04
New changeset 57faf348872d1d0af1808c82f535cf220d64b028 by Serhiy Storchaka in branch 'master':
bpo-33334: Support NOP and EXTENDED_ARG in dis.stack_effect(). (#6566)
https://github.com/python/cpython/commit/57faf348872d1d0af1808c82f535cf220d64b028
History
Date User Action Args
2018-04-25 19:06:05serhiy.storchakasetstatus: open -> closed
type: enhancement
resolution: fixed
stage: patch review -> resolved
2018-04-25 19:04:15serhiy.storchakasetmessages: + msg315758
2018-04-22 17:25:11serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request6262
2018-04-22 17:11:17serhiy.storchakacreate