Skip to content

Commit caeafb5

Browse files
committed
Address some review
1 parent 3574fda commit caeafb5

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

base/compiler/ssair/inlining.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,10 @@ function process_simple!(ir::IRCode, todo::Vector{Pair{Int, Any}}, idx::Int, sta
10891089
push!(todo, idx=>InliningTodo(nothing, ResolvedInliningSpec(ir′, linear_inline_eligible(ir′))))
10901090
return nothing
10911091
end
1092+
# Refuse to inline OpaqueClosures we can't see, to preserve the
1093+
# possibility of functions higher in the call stack seeing this
1094+
# and performing the inlining.
1095+
return nothing
10921096
end
10931097

10941098
sig = with_atype(sig)
@@ -1223,9 +1227,6 @@ function assemble_inline_todo!(ir::IRCode, state::InliningState)
12231227
ir.stmts[idx][:inst] = quoted(calltype.val)
12241228
continue
12251229
end
1226-
# Refuse to inline OpaqueClosures we can't see otherwise, to preserve the
1227-
# possibility of functions higher in the call stack seeing this
1228-
# and performing the inlining.
12291230
continue
12301231
end
12311232

base/compiler/tfuncs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,7 @@ function _opaque_closure_tfunc(@nospecialize(arg), @nospecialize(lb), @nospecial
13781378
argt, argt_exact = instanceof_tfunc(arg)
13791379
lbt, lb_exact = instanceof_tfunc(lb)
13801380
if !lb_exact
1381-
lbt = Union{}
1381+
lbt = Union{}
13821382
end
13831383

13841384
ubt, ub_exact = instanceof_tfunc(ub)

base/compiler/typeinfer.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,7 @@ function finish_opaque_closure!(clos::PartialOpaque, mod::Module, interp::Abstra
378378
argtypes = Any[argt.parameters...]
379379
pushfirst!(argtypes, clos.env)
380380
if isdispatchtuple(argt)
381-
# If we don't need to track specializations, just infer this here
382-
# right now.
381+
# If we don't need to track specializations, just infer this here right now.
383382
result = InferenceResult(Core.OpaqueClosure, argtypes)
384383
state = InferenceState(result, copy(clos.ci), false, interp)
385384
typeinf_local(interp, state)

src/julia.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ struct _jl_method_instance_t {
351351
uint8_t inInference; // flags to tell if inference is running on this object
352352
};
353353

354-
// YACK - Yet another kind of closure.
354+
// OpaqueClosure
355355
typedef struct jl_opaque_closure_t {
356356
JL_DATA_TYPE
357357
jl_value_t *env;

0 commit comments

Comments
 (0)