Skip to content

gh-145866: Convert _CALL_METHOD_DESCRIPTOR_NOARGS to leave its inputs on the stack to be cleaned up by _POP_TOP#148227

Open
Sacul0457 wants to merge 4 commits intopython:mainfrom
Sacul0457:Optimize-_CALL_METHOD_DESCRIPTOR_NOARGS
Open

gh-145866: Convert _CALL_METHOD_DESCRIPTOR_NOARGS to leave its inputs on the stack to be cleaned up by _POP_TOP#148227
Sacul0457 wants to merge 4 commits intopython:mainfrom
Sacul0457:Optimize-_CALL_METHOD_DESCRIPTOR_NOARGS

Conversation

@Sacul0457
Copy link
Copy Markdown
Contributor

@Sacul0457 Sacul0457 commented Apr 7, 2026

@Fidget-Spinner gentle ping :)
This seems to cause a stack underflow, but I am unable to figure out why. So instead of trying with no results, thought I'd just raise a PR instead!

@Fidget-Spinner
Copy link
Copy Markdown
Member

How do you know it's a stack underflow and not the wrong variable being passed? from the test logs, it looks more like the latter.

@Sacul0457
Copy link
Copy Markdown
Contributor Author

Sacul0457 commented Apr 8, 2026

Hmm, do we have to update the inlined version too?

@Fidget-Spinner
Copy link
Copy Markdown
Member

Oh right good catch, yes you do!

}
c = callable;
s = args[0];
INPUTS_DEAD();
Copy link
Copy Markdown
Contributor Author

@Sacul0457 Sacul0457 Apr 8, 2026

Choose a reason for hiding this comment

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

Not sure if we're allowed to use INPUTS_DEAD here because we previously did not call DEAD for cfunc

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

cfunc is an inline cache entry, so it doesn't need to be called dead.

Copy link
Copy Markdown
Member

@Fidget-Spinner Fidget-Spinner left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

2 participants