@@ -2034,12 +2034,12 @@ function array_type_undefable(@nospecialize(arytype))
2034
2034
end
2035
2035
end
2036
2036
2037
- function array_builtin_common_nothrow (argtypes:: Vector{Any} , isarrayref:: Bool )
2037
+ function array_builtin_common_nothrow (𝕃 :: AbstractLattice , argtypes:: Vector{Any} , isarrayref:: Bool )
2038
2038
first_idx_idx = isarrayref ? 3 : 4
2039
2039
length (argtypes) ≥ first_idx_idx || return false
2040
2040
boundscheck = argtypes[1 ]
2041
2041
arytype = argtypes[2 ]
2042
- array_builtin_common_typecheck (boundscheck, arytype, argtypes, first_idx_idx) || return false
2042
+ array_builtin_common_typecheck (𝕃, boundscheck, arytype, argtypes, first_idx_idx) || return false
2043
2043
if isarrayref
2044
2044
# If we could potentially throw undef ref errors, bail out now.
2045
2045
arytype = widenconst (arytype)
@@ -2056,8 +2056,9 @@ function array_builtin_common_nothrow(argtypes::Vector{Any}, isarrayref::Bool)
2056
2056
return false
2057
2057
end
2058
2058
2059
- @nospecs function array_builtin_common_typecheck (boundscheck, arytype,
2060
- argtypes:: Vector{Any} , first_idx_idx:: Int )
2059
+ @nospecs function array_builtin_common_typecheck (𝕃:: AbstractLattice ,
2060
+ boundscheck, arytype, argtypes:: Vector{Any} , first_idx_idx:: Int )
2061
+ ⊑ = Core. Compiler.:⊑ (𝕃)
2061
2062
(boundscheck ⊑ Bool && arytype ⊑ Array) || return false
2062
2063
for i = first_idx_idx: length (argtypes)
2063
2064
argtypes[i] ⊑ Int || return false
@@ -2080,11 +2081,11 @@ end
2080
2081
@nospecs function _builtin_nothrow (𝕃:: AbstractLattice , f, argtypes:: Vector{Any} , rt)
2081
2082
⊑ = Core. Compiler.:⊑ (𝕃)
2082
2083
if f === arrayset
2083
- array_builtin_common_nothrow (argtypes, #= isarrayref=# false ) || return false
2084
+ array_builtin_common_nothrow (𝕃, argtypes, #= isarrayref=# false ) || return false
2084
2085
# Additionally check element type compatibility
2085
2086
return arrayset_typecheck (argtypes[2 ], argtypes[3 ])
2086
2087
elseif f === arrayref || f === const_arrayref
2087
- return array_builtin_common_nothrow (argtypes, #= isarrayref=# true )
2088
+ return array_builtin_common_nothrow (𝕃, argtypes, #= isarrayref=# true )
2088
2089
elseif f === Core. _expr
2089
2090
length (argtypes) >= 1 || return false
2090
2091
return argtypes[1 ] ⊑ Symbol
0 commit comments