Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[mypyc] Coerce Register assignments - #11176

Merged
JukkaL merged 1 commit into
python:masterfrom
jhance:next-coerce
Sep 22, 2021
Merged

[mypyc] Coerce Register assignments#11176
JukkaL merged 1 commit into
python:masterfrom
jhance:next-coerce

Conversation

@jhance

@jhance jhance commented Sep 22, 2021

Copy link
Copy Markdown
Collaborator

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.

@JukkaL JukkaL left a comment

Copy link
Copy Markdown
Collaborator

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