-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eliminate Undef and Top types. fixes #8631
thanks to @vtjnash for the test case. It's hard to tell whether this is the real fix for the problem, but it works, and having a type that's not a subtype of Any around was just a huge pain. Things are simpler without it. Inside the compiler, undefinedness is no longer part of a variable's type. Instead there is a bit per variable telling whether it is ever used when undefined. This has the disadvantage of being coarser, since it doesn't give the undefinedness of each variable use. However it has the advantage of giving better type info: if a variable is either a Float64 or undefined, its type is just "Float64" and we can optimize accordingly. This combines well with the future optimization of storing possibly-undefined variables unboxed (#6914). For that we will add a run time 1-bit flag to track definedness, and then LLVM can hopefully eliminate checks along paths where the flag is known to be set, gaining back the previous granularity.
- Loading branch information
1 parent
deada3e
commit 84e80f4
Showing
15 changed files
with
115 additions
and
145 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
Oops, something went wrong.