@@ -586,15 +586,19 @@ add_tfunc(nfields, 1, 1, nfields_tfunc, 1)
586
586
add_tfunc (Core. _expr, 1 , INT_INF, @nospecs ((π:: AbstractLattice , args... )-> Expr), 100 )
587
587
add_tfunc (svec, 0 , INT_INF, @nospecs ((π:: AbstractLattice , args... )-> SimpleVector), 20 )
588
588
589
- @nospecs function _svec_len_tfunc (π :: AbstractLattice , s)
589
+ @nospecs function _svec_len_tfunc (:: AbstractLattice , s)
590
590
if isa (s, Const) && isa (s. val, SimpleVector)
591
591
return Const (length (s. val))
592
592
end
593
593
return Int
594
594
end
595
595
add_tfunc (Core. _svec_len, 1 , 1 , _svec_len_tfunc, 1 )
596
+ @nospecs function _svec_len_nothrow (π:: AbstractLattice , s)
597
+ β = partialorder (π)
598
+ return s β SimpleVector
599
+ end
596
600
597
- @nospecs function _svec_ref_tfunc (π :: AbstractLattice , s, i)
601
+ @nospecs function _svec_ref_tfunc (:: AbstractLattice , s, i)
598
602
if isa (s, Const) && isa (i, Const)
599
603
s, i = s. val, i. val
600
604
if isa (s, SimpleVector) && isa (i, Int)
@@ -604,7 +608,7 @@ add_tfunc(Core._svec_len, 1, 1, _svec_len_tfunc, 1)
604
608
return Any
605
609
end
606
610
add_tfunc (Core. _svec_ref, 2 , 2 , _svec_ref_tfunc, 1 )
607
- @nospecs function typevar_tfunc (π :: AbstractLattice , n, lb_arg, ub_arg)
611
+ @nospecs function typevar_tfunc (:: AbstractLattice , n, lb_arg, ub_arg)
608
612
lb = Union{}
609
613
ub = Any
610
614
ub_certain = lb_certain = true
@@ -2363,7 +2367,7 @@ function _builtin_nothrow(π::AbstractLattice, @nospecialize(f::Builtin), argt
2363
2367
return compilerbarrier_nothrow (argtypes[1 ], nothing )
2364
2368
elseif f === Core. _svec_len
2365
2369
na == 1 || return false
2366
- return _svec_len_tfunc (π, argtypes[1 ]) isa Const
2370
+ return _svec_len_nothrow (π, argtypes[1 ])
2367
2371
elseif f === Core. _svec_ref
2368
2372
na == 2 || return false
2369
2373
return _svec_ref_tfunc (π, argtypes[1 ], argtypes[2 ]) isa Const
0 commit comments