Skip to content

Commit 3b7815a

Browse files
committed
remove outdated handling of :static_parameter
After #51970, `Expr(:static_parameter, i::Int)` is now consistently outlined during the lowering, so there's no longer a need for `abstract_eval_value_expr` to handle this expression. This update removes the outdated handling, clarifying where we need to handle the expression.
1 parent 0f6c72c commit 3b7815a

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

base/compiler/abstractinterpretation.jl

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2340,20 +2340,7 @@ function abstract_eval_special_value(interp::AbstractInterpreter, @nospecialize(
23402340
end
23412341

23422342
function abstract_eval_value_expr(interp::AbstractInterpreter, e::Expr, vtypes::Union{VarTable,Nothing}, sv::AbsIntState)
2343-
head = e.head
2344-
if head === :static_parameter
2345-
n = e.args[1]::Int
2346-
nothrow = false
2347-
if 1 <= n <= length(sv.sptypes)
2348-
sp = sv.sptypes[n]
2349-
rt = sp.typ
2350-
nothrow = !sp.undef
2351-
else
2352-
rt = Any
2353-
end
2354-
merge_effects!(interp, sv, Effects(EFFECTS_TOTAL; nothrow))
2355-
return rt
2356-
elseif head === :call
2343+
if e.head === :call
23572344
# TODO: We still have non-linearized cglobal
23582345
@assert e.args[1] === Core.tuple ||
23592346
e.args[1] === GlobalRef(Core, :tuple)

0 commit comments

Comments
 (0)