8000 bpo-44060: Enable TARGET labels even when not using computed gotos. by smontanaro · Pull Request #25949 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

Closed
wants to merge 3 commits into from

Conversation

smontanaro
Copy link
Contributor
@smontanaro smontanaro commented May 6, 2021

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

@smontanaro
Copy link
Contributor Author

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.

@markshannon
Copy link
Member

Did you ever get this to compile without warnings?

@markshannon markshannon removed their request for review June 16, 2021 13:09
@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Jul 17, 2021
@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Aug 7, 2022
@smontanaro
Copy link
Contributor Author

Did you ever get this to compile without warnings?

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...

smontanaro added a commit to smontanaro/cpython that referenced this pull request Oct 14, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Oct 16, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Oct 16, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Oct 16, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Oct 17, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Oct 17, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Oct 18, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Oct 18, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Oct 19, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Oct 19, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Oct 20, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Oct 21, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Oct 21, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Nov 1, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Nov 1, 2022
@terryjreedy
Copy link
Member

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

@smontanaro smontanaro closed this Nov 2, 2022
@smontanaro smontanaro deleted the issue44060 branch November 2, 2022 00:55
@smontanaro
Copy link
Contributor Author
smontanaro commented Nov 2, 2022 via email

smontanaro added a commit to smontanaro/cpython that referenced this pull request Nov 2, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Nov 3, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Nov 3, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Nov 3, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Nov 3, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Nov 20, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Nov 22, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Nov 22, 2022
smontanaro added a commit to smontanaro/cpython that referenced this pull request Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0