Skip to content

[mypyc] Emit native_int instead of int64/int32 in IR test output - #10446

Merged
JukkaL merged 6 commits into
python:masterfrom
TH3CHARLie:emit-native-int
May 25, 2021
Merged

[mypyc] Emit native_int instead of int64/int32 in IR test output #10446
JukkaL merged 6 commits into
python:masterfrom
TH3CHARLie:emit-native-int

Conversation

@TH3CHARLie

@TH3CHARLie TH3CHARLie commented May 8, 2021

Copy link
Copy Markdown
Collaborator

relates mypyc/mypyc#776

This is a super quick workaround. So far the issue mostly (if not completely) occurs in c_pyssize_t so making this rtype emits native_int would solve the issue. As a result, the replace_native_int pass in IR test is now removed.

@TH3CHARLie
TH3CHARLie marked this pull request as draft May 8, 2021 07:13
@TH3CHARLie
TH3CHARLie requested a review from JukkaL May 8, 2021 08:05
@TH3CHARLie
TH3CHARLie marked this pull request as ready for review May 8, 2021 08:05
@97littleleaf11

Copy link
Copy Markdown
Collaborator

lgtm

@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.

Very nice! Confusion between different integer types in tests has been a common pain point. This will reduce friction when writing new features and changing the generated IR significantly.

@JukkaL
JukkaL merged commit 61c3462 into python:master May 25, 2021
@TH3CHARLie
TH3CHARLie deleted the emit-native-int branch May 26, 2021 00:53
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.

3 participants