Skip to content

Support unary op via CallC #8933

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

Merged
merged 1 commit into from
Jun 3, 2020
Merged

Support unary op via CallC #8933

merged 1 commit into from
Jun 3, 2020

Conversation

TH3CHARLie
Copy link
Collaborator

related mypyc/mypyc#709, mypyc/mypyc#734

Support unary ops and provide int_neg_op as an example.

@@ -131,13 +131,12 @@ def int_compare_op(op: str, c_func_name: str) -> None:
emit=simple_emit('{dest} = {args[0]} + {args[1]};'))


def int_unary_op(op: str, c_func_name: str) -> OpDescription:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Some thoughts: I think the original design somehow reflects or predicts what we are doing now

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, the new approach fits in very nicely here.

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

Thanks, looks good!

@@ -131,13 +131,12 @@ def int_compare_op(op: str, c_func_name: str) -> None:
emit=simple_emit('{dest} = {args[0]} + {args[1]};'))


def int_unary_op(op: str, c_func_name: str) -> OpDescription:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, the new approach fits in very nicely here.

@JukkaL JukkaL merged commit dfcff68 into python:master Jun 3, 2020
@TH3CHARLie TH3CHARLie deleted the unary-ops branch June 3, 2020 14:17
@TH3CHARLie
Copy link
Collaborator Author

Thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants