Skip to content

Commit 619edba

Browse files
committed
conservatively escape direct arguments of foreigncall
1 parent 255c25c commit 619edba

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

base/compiler/ssair/EscapeAnalysis/EscapeAnalysis.jl

+7-5
Original file line numberDiff line numberDiff line change
@@ -1234,13 +1234,15 @@ function escape_foreigncall!(astate::AnalysisState, pc::Int, args::Vector{Any})
12341234
add_escape_change!(astate, name, name_info)
12351235
add_liveness_change!(astate, name, pc)
12361236
for i = 1:nargs
1237+
# COMBAK
12371238
# we should escape this argument if it is directly called,
12381239
# otherwise just impose ThrownEscape if not nothrow
1239-
if argtypes[i] === Any
1240-
arg_info =
1241-
else
1242-
arg_info = nothrow ?: ThrownEscape(pc)
1243-
end
1240+
# if argtypes[i] === Any
1241+
# arg_info = ⊤
1242+
# else
1243+
# arg_info = nothrow ? ⊥ : ThrownEscape(pc)
1244+
# end
1245+
arg_info = nothrow ?:
12441246
add_escape_change!(astate, args[5+i], arg_info)
12451247
add_liveness_change!(astate, args[5+i], pc)
12461248
end

0 commit comments

Comments
 (0)