[issue27129] Wordcode, part 2
Serhiy Storchaka
report at bugs.python.org
Wed Jun 8 15:42:24 EDT 2016
Serhiy Storchaka added the comment:
Here is a patch that just refactors the code. It renames OPCODE and OPCODE to _Py_OPCODE and _Py_OPCODE and moves them to code.h for reusing in other files. Introduces _Py_CODEUNIT as an alias to unsigned short (if it is 16-bit, otherwise a compile error is raised). Makes compiler and peepholer to operate with _Py_CODEUNIT units instead of bytes. Replaces or scale magic numbers with sizeof(_Py_CODEUNIT). Adds fill_nops() for filling specified region with NOPs. Decreases memory consumption for peepholer (doesn't allocate memory for unused odd addresses).
----------
Added file: http://bugs.python.org/file43308/wordcode-refactor.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27129>
_______________________________________
More information about the Python-bugs-list
mailing list