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

[mypyc] Coerce Register assignments #11176

Merged
merged 1 commit into from
Sep 22, 2021
Merged

Conversation

jhance
Copy link
Collaborator

@jhance jhance commented Sep 22, 2021

Fixes mypyc/mypyc#759 and probably some other issues. Including only
the change to coerce the Register assignments fixes the missing
type coercion for the specialized next-generator case, but causes some
unusual box-then-unbox from short_ints.

These odd coercions are caused by the dict keys in dict literals being
considered short_int, but dict_next_rtuple_single/pair return types bein
annotated as int_primitive. Changing this to short_int_rprimitive removes
the odd coercisions. The remainder of the diff is fixing the irbuild
testcase output to have short_int.

Fixes mypyc/mypyc#759 and probably some other issues. Including only
the change to coerce the Register assignments fixes the missing
type coercion for the specialized next-generator case, but causes some
unusual box-then-unbox from short_ints.

These odd coercions are caused by the dict keys in dict literals being
considered short_int, but dict_next_rtuple_single/pair return types bein
annotated as int_primitive. Changing this to short_int_rprimitive removes
the odd coercisions. The remainder of the diff is fixing the irbuild
testcase output to have short_int.
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.

LGTM

@JukkaL JukkaL merged commit 2aebd4c into python:master Sep 22, 2021
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.

Missing type coercion in next op
2 participants