Skip to content

Commit 027d9f9

Browse files
committed
conservatively escape direct arguments of foreigncall
1 parent 4fea9ed commit 027d9f9

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
@@ -1229,13 +1229,15 @@ function escape_foreigncall!(astate::AnalysisState, pc::Int, args::Vector{Any})
12291229
add_escape_change!(astate, name, name_info)
12301230
add_liveness_change!(astate, name, pc)
12311231
for i = 1:nargs
1232+
# COMBAK
12321233
# we should escape this argument if it is directly called,
12331234
# otherwise just impose ThrownEscape if not nothrow
1234-
if argtypes[i] === Any
1235-
arg_info =
1236-
else
1237-
arg_info = nothrow ?: ThrownEscape(pc)
1238-
end
1235+
# if argtypes[i] === Any
1236+
# arg_info = ⊤
1237+
# else
1238+
# arg_info = nothrow ? ⊥ : ThrownEscape(pc)
1239+
# end
1240+
arg_info = nothrow ?:
12391241
add_escape_change!(astate, args[5+i], arg_info)
12401242
add_liveness_change!(astate, args[5+i], pc)
12411243
end

0 commit comments

Comments
 (0)