-
-
Notifications
You must be signed in to change notification settings - Fork 3k
[mypyc] Support var arg in CallC, replace new_dict_op #8948
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
The current codegen for mypy/mypyc/codegen/emitfunc.py Lines 418 to 421 in 348a9d4
Seeing this, I start to think, does the newly introduced Updates: so far in the C code generation scheme, it is indeed unnecessary, but we'd keep it for further backends. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Left a bunch of minor comments, mostly suggestions about additional comments/docstrings.
This a compelling use case for the new IR. Getting rid of callbacks used for primitives makes things a lot cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates!
related mypyc/mypyc#709 mypyc/mypyc#734
Summary:
CallC
new_dict_op
(which relies on a specialized emit callback) with twoCallC
ops:dict_new_op
anddict_build_op
, which handles create an empty dict and a dict from k-v pairs.testDel
case into three subcases which test list, dict and attributes respectively.