@@ -581,15 +581,19 @@ add_tfunc(nfields, 1, 1, nfields_tfunc, 1)
581
581
add_tfunc (Core. _expr, 1 , INT_INF, @nospecs ((π:: AbstractLattice , args... )-> Expr), 100 )
582
582
add_tfunc (svec, 0 , INT_INF, @nospecs ((π:: AbstractLattice , args... )-> SimpleVector), 20 )
583
583
584
- @nospecs function _svec_len_tfunc (π :: AbstractLattice , s)
584
+ @nospecs function _svec_len_tfunc (:: AbstractLattice , s)
585
585
if isa (s, Const) && isa (s. val, SimpleVector)
586
586
return Const (length (s. val))
587
587
end
588
588
return Int
589
589
end
590
590
add_tfunc (Core. _svec_len, 1 , 1 , _svec_len_tfunc, 1 )
591
+ @nospecs function _svec_len_nothrow (π:: AbstractLattice , s)
592
+ β = partialorder (π)
593
+ return s β SimpleVector
594
+ end
591
595
592
- @nospecs function _svec_ref_tfunc (π :: AbstractLattice , s, i)
596
+ @nospecs function _svec_ref_tfunc (:: AbstractLattice , s, i)
593
597
if isa (s, Const) && isa (i, Const)
594
598
s, i = s. val, i. val
595
599
if isa (s, SimpleVector) && isa (i, Int)
@@ -599,7 +603,7 @@ add_tfunc(Core._svec_len, 1, 1, _svec_len_tfunc, 1)
599
603
return Any
600
604
end
601
605
add_tfunc (Core. _svec_ref, 2 , 2 , _svec_ref_tfunc, 1 )
602
- @nospecs function typevar_tfunc (π :: AbstractLattice , n, lb_arg, ub_arg)
606
+ @nospecs function typevar_tfunc (:: AbstractLattice , n, lb_arg, ub_arg)
603
607
lb = Union{}
604
608
ub = Any
605
609
ub_certain = lb_certain = true
@@ -2338,7 +2342,7 @@ function _builtin_nothrow(π::AbstractLattice, @nospecialize(f::Builtin), argt
2338
2342
return compilerbarrier_nothrow (argtypes[1 ], nothing )
2339
2343
elseif f === Core. _svec_len
2340
2344
na == 1 || return false
2341
- return _svec_len_tfunc (π, argtypes[1 ]) isa Const
2345
+ return _svec_len_nothrow (π, argtypes[1 ])
2342
2346
elseif f === Core. _svec_ref
2343
2347
na == 2 || return false
2344
2348
return _svec_ref_tfunc (π, argtypes[1 ], argtypes[2 ]) isa Const
0 commit comments