[issue27097] ceval: Wordcode follow up, explicit unsigned short read

Demur Rumed report at bugs.python.org
Tue May 24 19:44:15 EDT 2016


Demur Rumed added the comment:

There's some difficulty in changing next_instr to an unsigned short* unless pointer arithmetic converts it back to unsigned char*. Code relies on f_lasti to be a byte index more than it relies on f_lasti to be -1 at first. Should this change include converting jump offsets to word increments? This patch seeks to be a minimal change to achieve the desired aligned/batched memory read behavior of NEXTOP/NEXTARG. Perhaps a clear description of how deep the changes should be is in order

It's also a bit hard to assert pointer alignment without failling back to stdint's uintptr_t. It may be sufficient to assert f_lasti is an even number

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27097>
_______________________________________


More information about the Python-bugs-list mailing list