Add file describing how to add or modify specialized families of instructions.#26954
Conversation
Fidget-Spinner
left a comment
There was a problem hiding this comment.
LGTM. I noticed some of the lower level implementation details aren't described (like the code and data layout, being positive and negative indexes on a contiguous array). But those will probably change quite a bit over time, so I think it's fine to omit them.
Sorry, something went wrong.
gvanrossum
left a comment
There was a problem hiding this comment.
Can you fold lines longer than 80 characters?
Adding more code examples would make the doc more accessible. At the very least indicate where to find the examples you do mention in the source code.
Sorry, something went wrong.
|
I would advice to copy/move this guide to https://github.com/python/devguide as this is going to be much more visible there than a readme in the Python directory. |
Sorry, something went wrong.
Not clear that we need to give it much visibility though. There are probably only 20-30 opcodes that are candidates for specialization and only very few people (including everyone reading this PR :-) will need it. There are other readmes sprinkled throughout the code for similarly obscure things. Maybe there should be a mention of this readme in ceval.c or specialize.c though? |
Sorry, something went wrong.
Right, that is probably a much better approach than the devguide 👍 |
Sorry, something went wrong.
gvanrossum
left a comment
There was a problem hiding this comment.
Let's land this!
Sorry, something went wrong.
We've had a few contributors wanting to implement specialized instructions.
To help out those contributors, I thought it would be useful add a "how to" describing the process.