Skip to content
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

BINARY_SUBSCR_GETITEM has duplicate CALL_STAT_INC(inlined_py_calls) #96653

Closed
itamaro opened this issue Sep 7, 2022 · 2 comments
Closed

BINARY_SUBSCR_GETITEM has duplicate CALL_STAT_INC(inlined_py_calls) #96653

itamaro opened this issue Sep 7, 2022 · 2 comments
Assignees
Labels
type-bug An unexpected behavior, bug, or error

Comments

@itamaro
Copy link
Contributor

itamaro commented Sep 7, 2022

as titled and discussed in GH-92257

@itamaro itamaro added the type-bug An unexpected behavior, bug, or error label Sep 7, 2022
@itamaro
Copy link
Contributor Author

itamaro commented Sep 7, 2022

permalink -

cpython/Python/ceval.c

Lines 1662 to 1674 in 3eaf70d

CALL_STAT_INC(inlined_py_calls);
STACK_SHRINK(2);
new_frame->localsplus[0] = container;
new_frame->localsplus[1] = sub;
for (int i = 2; i < code->co_nlocalsplus; i++) {
new_frame->localsplus[i] = NULL;
}
_PyFrame_SetStackPointer(frame, stack_pointer);
JUMPBY(INLINE_CACHE_ENTRIES_BINARY_SUBSCR);
frame->prev_instr = next_instr - 1;
new_frame->previous = frame;
frame = cframe.current_frame = new_frame;
CALL_STAT_INC(inlined_py_calls);

@Fidget-Spinner I'm happy to submit a PR - not sure which one should be removed (or whether it matters)

@Fidget-Spinner
Copy link
Member

It doesn't really matter, but I'd prefer we keep the one nearer to the bottom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants