-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mypyc] Foundational work to help support native ints (#12884)
Some IR and codegen changes that help with native int support. This was split off from a branch with a working implementation of native ints to make reviewing easier. Some tests and primitives are missing here and I will include them in follow-up PRs. Summary of major changes below. 1) Allow ambiguous error returns from functions. Since all values of `i64` values are valid return values, none can be reserved for errors. The approach here is to have the error value overlap a valid value, and use `PyErr_Occurred()` as a secondary check to make sure it actually was an error. 2) Add `Extend` op which extends a value to a larger integer type with either zero or sign extension. 3) Improve subtype checking with native int types. 4) Fill in other minor gaps in IR and codegen support for native ints. Work on mypyc/mypyc#837.
- Loading branch information
Showing
13 changed files
with
335 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.