-
-
Notifications
You must be signed in to change notification settings - Fork 3k
[mypyc] Support top level function ops via CallC #8902
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
Matching |
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!
Let me know when you are ready with the PR (it now says WIP). |
Yes, I'd say it's WIP because I intend to include |
I think it's now ready for review(assuming all tests passed). Updates(57a1b91): Well, many tests failed. I observe and summarize that are two kinds of failing tests. The first one is IR tests, which can be fixed quickly. The second kind is about traceback, changing list_set_item op somehow produces much less traceback info. updates(983d635): I revert |
@@ -83,7 +84,6 @@ def emit_new(emitter: EmitterInterface, args: List[str], dest: str) -> None: | |||
error_kind=ERR_FALSE, | |||
emit=call_emit('CPyList_SetItem')) | |||
|
|||
|
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.
I delete a blank line here and I find that one/two blank line(s) is used interchangeably. I am surprised that flake8 is OK with this
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.
Left some comments about coercing the result type.
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! Looks great.
Thanks for the review! |
relates mypyc/mypyc#709
This PR supports top-level function ops via recently added
CallC
IR. To demonstrate the idea, it transformto_list
op fromPrimitiveOp
toCallC
. It also refinesCallC
with arguments coercing and support ofsteals
.