GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — gh-87092: move assembler related code from compile.c to assemble.c by iritkatriel · Pull Request #103277 · python/cpython Conversation
|
| static int cfg_to_instr_sequence(cfg_builder *g, instr_sequence *seq); | ||
|
|
||
| static PyCodeObject * | ||
| assemble_code_unit(struct compiler_unit *u, PyObject *const_cache, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Is this name still correct? Was it ever?
It seems to do optimization and assembly.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
There used to be just assemble(C) which takes the compiler and and does all the optimization and assembly. I split out assemble_code_unit (which takes just the c->u and not the whole c) and does most of what used to be in assemble(). So the name was always incorrect (assemble() called the optimizer). I think the reason it was done like this is that assemble() gets called from a number of places in the compiler (lambda, class, module, etc). So it was convenient to have one function that does opt+assemble and returns a code object.
We can rename assemble() and assemble_code_unit(). Any suggestions what to call it? something like instr_sequence_to_code_object()?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.