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-105481: add flags to each instr in the opcode metadata table, to replace opcode.hasarg/hasname/hasconst by iritkatriel · Pull Request #105482 · python/cpython Conversation
|
I think so (unless all the flags are always false for all pseudo-ops, which I doubt is the case). In fact I think we should probably propose a solution for moving the canonical definition of the numeric opcode values before we move on this. (Other than that, this approach seems fine.) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Also I don’t know how to identify the jump opcodes in the generator. JUMPBY is used for caches so it’s no help. Maybe we could have a SKIP_CACHE macro and the a jumpby is really a jump? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
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.
Also I don’t know how to identify the jump opcodes in the generator. JUMPBY is used for caches so it’s no help. Maybe we could have a SKIP_CACHE macro and the a jumpby is really a jump?
Yeah, disambiguating these through their macro names sounds fine.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
LG. Next steps? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
next is to rebase and enable the assertions for pseudo ops. If that worksI'll check the diff, maybe this PR is done then. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Maybe we should make the parser or generator complain if you use |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
How would it know? Maybe the original idea of looking for that sequence of tokens isn't so bad. Just don't fold it into |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I didn't like that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I grepped and I see about a dozen places where frame->f_code is used to access something other than co_consts or co_names. So you'd need to review those. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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.
Undraft, add skip news label, go!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| [SEND] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG }, | ||
| [SEND_GEN] = { true, INSTR_FMT_IBC, HAS_ARG_FLAG }, | ||
| [INSTRUMENTED_YIELD_VALUE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG }, | ||
| [YIELD_VALUE] = { true, INSTR_FMT_IB, HAS_ARG_FLAG }, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I just noticed that this PR changed the format of YIELD_VALUE/INSTRUMENTED_YIELD_VALUE from INSTR_FMT_IX to INSTR_FMT_IB. This is because we added the assertion that makes the generator identify it has HAS_ARG. I guess the new value is correct?
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.
In opcode.py it is classified as having an arg (by being >= HAVE_ARGUMENT) so I think it's correct. The oparg is used elsewhere to indicate the stack depth.
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.