Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-98686: Fix compiler warning forHAS_ARG#99106

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
brandtbucher merged 2 commits intopython:mainfrombrandtbucher:has-arg-warning
Nov 4, 2022

Conversation

brandtbucher
Copy link
Member

@brandtbucherbrandtbucher commentedNov 4, 2022
edited by bedevere-bot
Loading

@brandtbucherbrandtbucher added skip news interpreter-core(Objects, Python, Grammar, and Parser dirs) labelsNov 4, 2022
@brandtbucherbrandtbucher self-assigned thisNov 4, 2022
@bedevere-botbedevere-bot mentioned this pull requestNov 4, 2022
@@ -143,7 +143,7 @@ lltrace_instruction(_PyInterpreterFrame *frame,
const char *opname = _PyOpcode_OpName[opcode];
assert(opname != NULL);
int offset = (int)(next_instr - _PyCode_CODE(frame->f_code));
if (HAS_ARG(_PyOpcode_Deopt[opcode])) {
if (HAVE_ARGUMENT <=_PyOpcode_Deopt[opcode]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

HAVE_ARGUMENT isn't used directly anywhere else. I think casting and using HAS_ARG might be better.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

But we don't have to worry about things like pseudo-opcodes, right? This seems like exactly the sort of thingHAVE_ARGUMENT is meant for...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Kind of. HAVE_ARGUMENT was there before we had pseudo-opcodes, and HAS_ARG just compared with it. Now we have pseudo-opcodes, and if I saw HAVE_ARGUMENT in the code now my first thought would be that this is a bug (a place where we didn't update for pseudo-opcodes). So the trick is to make this not look like a bug.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@iritkatrieliritkatrieliritkatriel approved these changes

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

Assignees

@brandtbucherbrandtbucher

Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)skip news
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@brandtbucher@iritkatriel@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp