Commit 8066c29
authored
AbstractInterpreter: add a hook to customize bestguess calculation (#50744)
Currently, the code that updates `bestguess` using `ReturnNode`
information includes hardcodes that relate to `Conditional` and
`LimitedAccuracy`. These behaviors are actually lattice-dependent and
therefore should be overloadable by `AbstractInterpreter`.
Additionally, particularly in Diffractor, a clever strategy is required
to update return types in a way that it takes into account information
from both the original method and its rule method
(xref: JuliaDiff/Diffractor.jl#202). This also requires such an overload
to exist.
In response to these needs, this commit introduces an implementation of
a hook named `update_bestguess!`.1 parent 9822257 commit 8066c29
2 files changed
+58
-48
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2887 | 2887 | | |
2888 | 2888 | | |
2889 | 2889 | | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
| 2901 | + | |
| 2902 | + | |
| 2903 | + | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
2890 | 2924 | | |
2891 | 2925 | | |
2892 | 2926 | | |
2893 | 2927 | | |
2894 | 2928 | | |
2895 | | - | |
2896 | | - | |
2897 | 2929 | | |
2898 | 2930 | | |
2899 | 2931 | | |
2900 | | - | |
| 2932 | + | |
2901 | 2933 | | |
2902 | 2934 | | |
2903 | 2935 | | |
| |||
2998 | 3030 | | |
2999 | 3031 | | |
3000 | 3032 | | |
3001 | | - | |
3002 | 3033 | | |
3003 | | - | |
3004 | | - | |
3005 | | - | |
3006 | | - | |
3007 | | - | |
3008 | | - | |
3009 | | - | |
3010 | | - | |
3011 | | - | |
3012 | | - | |
3013 | | - | |
3014 | | - | |
3015 | | - | |
3016 | | - | |
3017 | | - | |
3018 | | - | |
3019 | | - | |
3020 | | - | |
3021 | | - | |
3022 | | - | |
3023 | | - | |
3024 | | - | |
3025 | | - | |
3026 | | - | |
3027 | | - | |
| 3034 | + | |
3028 | 3035 | | |
3029 | | - | |
| 3036 | + | |
3030 | 3037 | | |
3031 | 3038 | | |
3032 | 3039 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
870 | 870 | | |
871 | 871 | | |
872 | 872 | | |
| 873 | + | |
873 | 874 | | |
874 | 875 | | |
875 | | - | |
876 | | - | |
877 | | - | |
878 | | - | |
879 | | - | |
880 | | - | |
881 | | - | |
882 | | - | |
883 | | - | |
884 | | - | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
| 876 | + | |
893 | 877 | | |
894 | 878 | | |
895 | 879 | | |
| |||
933 | 917 | | |
934 | 918 | | |
935 | 919 | | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
936 | 939 | | |
937 | 940 | | |
938 | 941 | | |
| |||
0 commit comments