@@ -94,7 +94,7 @@ function abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize(f),
94
94
# end
95
95
mresult = abstract_call_method (interp, method, sig, match. sparams, multiple_matches, si, sv):: Future
96
96
function handle1 (interp, sv)
97
- local (; rt, exct, edge, effects, volatile_inf_result) = mresult[]
97
+ local (; rt, exct, effects, volatile_inf_result) = mresult[]
98
98
this_conditional = ignorelimited (rt)
99
99
this_rt = widenwrappedconditional (rt)
100
100
this_exct = exct
@@ -118,17 +118,17 @@ function abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize(f),
118
118
# e.g. in cases when there are cycles but cached result is still accurate
119
119
this_conditional = this_const_conditional
120
120
this_rt = this_const_rt
121
- (; effects, const_result, edge ) = const_call_result
121
+ (; effects, const_result) = const_call_result
122
122
elseif is_better_effects (const_call_result. effects, effects)
123
- (; effects, const_result, edge ) = const_call_result
123
+ (; effects, const_result) = const_call_result
124
124
else
125
125
add_remark! (interp, sv, " [constprop] Discarded because the result was wider than inference" )
126
126
end
127
127
# Treat the exception type separately. Currently, constprop often cannot determine the exception type
128
128
# because consistent-cy does not apply to exceptions.
129
129
if const_call_result. exct ⋤ this_exct
130
130
this_exct = const_call_result. exct
131
- (; const_result, edge ) = const_call_result
131
+ (; const_result) = const_call_result
132
132
else
133
133
add_remark! (interp, sv, " [constprop] Discarded exception type because result was wider than inference" )
134
134
end
@@ -228,7 +228,6 @@ function abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize(f),
228
228
# and avoid keeping track of a more complex result type.
229
229
rettype = Any
230
230
end
231
- any_slot_refined = slotrefinements != = nothing
232
231
if isa (sv, InferenceState)
233
232
# TODO (#48913) implement a proper recursion handling for irinterp:
234
233
# This works just because currently the `:terminate` condition guarantees that
@@ -814,13 +813,11 @@ struct ConstCallResults
814
813
exct:: Any
815
814
const_result:: ConstResult
816
815
effects:: Effects
817
- edge:: MethodInstance
818
816
function ConstCallResults (
819
817
@nospecialize (rt), @nospecialize (exct),
820
818
const_result:: ConstResult ,
821
- effects:: Effects ,
822
- edge:: MethodInstance )
823
- return new (rt, exct, const_result, effects, edge)
819
+ effects:: Effects )
820
+ return new (rt, exct, const_result, effects)
824
821
end
825
822
end
826
823
@@ -972,9 +969,9 @@ function concrete_eval_call(interp::AbstractInterpreter,
972
969
catch e
973
970
# The evaluation threw. By :consistent-cy, we're guaranteed this would have happened at runtime.
974
971
# Howevever, at present, :consistency does not mandate the type of the exception
975
- return ConstCallResults (Bottom, Any, ConcreteResult (edge, result. effects), result. effects, edge )
972
+ return ConstCallResults (Bottom, Any, ConcreteResult (edge, result. effects), result. effects)
976
973
end
977
- return ConstCallResults (Const (value), Union{}, ConcreteResult (edge, EFFECTS_TOTAL, value), EFFECTS_TOTAL, edge )
974
+ return ConstCallResults (Const (value), Union{}, ConcreteResult (edge, EFFECTS_TOTAL, value), EFFECTS_TOTAL)
978
975
end
979
976
980
977
# check if there is a cycle and duplicated inference of `mi`
@@ -1239,7 +1236,7 @@ function semi_concrete_eval_call(interp::AbstractInterpreter,
1239
1236
effects = Effects (effects; noub= ALWAYS_TRUE)
1240
1237
end
1241
1238
exct = refine_exception_type (result. exct, effects)
1242
- return ConstCallResults (rt, exct, SemiConcreteResult (mi, ir, effects, spec_info (irsv)), effects, mi )
1239
+ return ConstCallResults (rt, exct, SemiConcreteResult (mi, ir, effects, spec_info (irsv)), effects)
1243
1240
end
1244
1241
end
1245
1242
end
@@ -1248,7 +1245,7 @@ end
1248
1245
1249
1246
const_prop_result (inf_result:: InferenceResult ) =
1250
1247
ConstCallResults (inf_result. result, inf_result. exc_result, ConstPropResult (inf_result),
1251
- inf_result. ipo_effects, inf_result . linfo )
1248
+ inf_result. ipo_effects)
1252
1249
1253
1250
# return cached result of constant analysis
1254
1251
return_localcache_result (:: AbstractInterpreter , inf_result:: InferenceResult , :: AbsIntState ) =
@@ -2186,7 +2183,7 @@ function abstract_invoke(interp::AbstractInterpreter, arginfo::ArgInfo, si::Stmt
2186
2183
mresult = abstract_call_method (interp, method, ti, env, false , si, sv):: Future
2187
2184
match = MethodMatch (ti, env, method, argtype <: method.sig )
2188
2185
return Future {CallMeta} (mresult, interp, sv) do result, interp, sv
2189
- (; rt, exct, edge, effects, volatile_inf_result) = result
2186
+ (; rt, exct, effects, volatile_inf_result) = result
2190
2187
res = nothing
2191
2188
sig = match. spec_types
2192
2189
argtypes′ = invoke_rewrite (argtypes)
@@ -2207,10 +2204,10 @@ function abstract_invoke(interp::AbstractInterpreter, arginfo::ArgInfo, si::Stmt
2207
2204
const_result = volatile_inf_result
2208
2205
if const_call_result != = nothing
2209
2206
if const_call_result. rt ⊑ rt
2210
- (; rt, effects, const_result, edge ) = const_call_result
2207
+ (; rt, effects, const_result) = const_call_result
2211
2208
end
2212
2209
if const_call_result. exct ⋤ exct
2213
- (; exct, const_result, edge ) = const_call_result
2210
+ (; exct, const_result) = const_call_result
2214
2211
end
2215
2212
end
2216
2213
rt = from_interprocedural! (interp, rt, sv, arginfo, sig)
@@ -2410,19 +2407,19 @@ function abstract_call_opaque_closure(interp::AbstractInterpreter,
2410
2407
mresult = abstract_call_method (interp, ocmethod, sig, Core. svec (), false , si, sv)
2411
2408
ocsig_box = Core. Box (ocsig)
2412
2409
return Future {CallMeta} (mresult, interp, sv) do result, interp, sv
2413
- (; rt, exct, edge, effects, volatile_inf_result, edgecycle) = result
2410
+ (; rt, exct, effects, volatile_inf_result, edgecycle) = result
2414
2411
𝕃ₚ = ipo_lattice (interp)
2415
2412
⊑ , ⋤ , ⊔ = partialorder (𝕃ₚ), strictneqpartialorder (𝕃ₚ), join (𝕃ₚ)
2416
2413
const_result = volatile_inf_result
2417
2414
if ! edgecycle
2418
2415
const_call_result = abstract_call_method_with_const_args (interp, result,
2419
- nothing , arginfo, si, match, sv)
2416
+ #= f =# nothing , arginfo, si, match, sv)
2420
2417
if const_call_result != = nothing
2421
2418
if const_call_result. rt ⊑ rt
2422
- (; rt, effects, const_result, edge ) = const_call_result
2419
+ (; rt, effects, const_result) = const_call_result
2423
2420
end
2424
2421
if const_call_result. exct ⋤ exct
2425
- (; exct, const_result, edge ) = const_call_result
2422
+ (; exct, const_result) = const_call_result
2426
2423
end
2427
2424
end
2428
2425
end
0 commit comments