[issue40925] Remove redundant macros used for stack manipulation in interpreter

Terry J. Reedy report at bugs.python.org
Sat Jun 13 06:24:02 EDT 2020


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I could understand wanting to replace TOP,...,FOURTH with PEEK(n) and the SET_XYZs with the now deleted SET(_VALUE)(n, v), but to me, replacing PEEK-SET with POPs and PUSHes (in different orders) that directly mean something different but that compilers (all?) optimize to mean the same thing makes the code initially harder to read.  In particular, the old version of TARGET(ROT_FOUR) is initially clearer without thinking through the effect of the particular order of pushes in the new version.  It depends on what one is accustomed to.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40925>
_______________________________________


More information about the Python-bugs-list mailing list