-
-
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.
lattice: Allow external lattice to have a say in how to widen (#47307)
Currently, when e.g. a PartialStruct is not of interest to the lattice code, it just calls `widenconst` on it to pass it to the next lattice layer. This might be insufficient if an intermediate lattice layer has some other representation that is wider that the `PartialStruct`, but narrower than the corresponding `widenconst`. This adds `widenconst(::AbstractLatice, ::Any)` to allow the lattices to insert custom widening code. By default, it ends up calling `widenconst`, so there's no functional change in base, but custom lattices can make use of the extra hook. I'm not entirely sure that this is what we want the final interface to look like (I think it probably does too many type checks), but it works reasonably well and I think is good enough to experiment with.
- Loading branch information
Showing
3 changed files
with
34 additions
and
22 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