[issue43129] Number of object on stack required by opcode

2021-02-05 Thread Irit Katriel
Irit Katriel added the comment: stack_effect is implemented in compile.c because it is used there. If you need something for an application like bytecode, it doesn't need to be in the cpython c code. It can be in the standard library in opcode.py, or even in bytecode library itself. The ques

[issue43129] Number of object on stack required by opcode

2021-02-04 Thread Matthieu Dartiailh
New submission from Matthieu Dartiailh : When constructing bytecode object manually as can be done using the bytecode library (https://github.com/MatthieuDartiailh/bytecode which was first developed by V Stinner), one can use dis.stack_effect to compute the required stack size, thus avoiding