-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-44060: Enable TARGET labels even when not using computed gotos. #25949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I realize that enabling the more featureful TARGET macro without computed gotos generates compiler warnings. I'm open to suggestions for how to suppress them. |
…a debug version of the interpreter.
Did you ever get this to compile without warnings? |
This PR is stale because it has been open for 30 days with no activity. |
Nope. But I didn't really try too hard (read: not at all)... I'll try to get this to merge cleanly again, then see about warnings... |
To fix the conflict, I believe the stuff between #ifdef Py_STATS
#define INSTRUCTION_START(op) \
do { \
frame->prev_instr = next_instr++; \
OPCODE_EXE_INC(op); \
if (_py_stats) _py_stats->opcode_stats[lastopcode].pair_count[op]++; \
lastopcode = op; \
} while (0)
#else
#define INSTRUCTION_START(op) (frame->prev_instr = next_instr++)
#endif
#if USE_COMPUTED_GOTOS || defined(Py_DEBUG)
#define TARGET(op) op: TARGET_##op
#else
#define TARGET(op) op
#endif
#if USE_COMPUTED_GOTOS
#define DISPATCH_GOTO() goto *opcode_targets[opcode]
#else |
Thanks Terry. I deleted this and have another ready to go (which I think I
forgot about — some aspects of getting old suck...)
Skip
…On Tue, Nov 1, 2022 at 4:07 PM Terry Jan Reedy ***@***.***> wrote:
To fix the conflict, I believe the stuff between <<<<<< and >>>>>>>
should become
#ifdef Py_STATS
#define INSTRUCTION_START(op) \
do { \
frame->prev_instr = next_instr++; \
OPCODE_EXE_INC(op); \
if (_py_stats) _py_stats->opcode_stats[lastopcode].pair_count[op]++; \
lastopcode = op; \
} while (0)
#else
#define INSTRUCTION_START(op) (frame->prev_instr = next_instr++)
#endif
#if USE_COMPUTED_GOTOS || defined(Py_DEBUG)
#define TARGET(op) op: TARGET_##op
#else
#define TARGET(op) op
#endif
#if USE_COMPUTED_GOTOS
#define DISPATCH_GOTO() goto *opcode_targets[opcode]
#else
—
Reply to this email directly, view it on GitHub
<#25949 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2E3IL4HMJQ2SZOO3JOSALWGGA7LANCNFSM44HKH3KQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This change enables the TARGET_##op labels even when computed gotos aren't enabled. That generates a bunch of compiler warnings, but the labels allow gdb to break on them.
https://bugs.python.org/issue44060