Skip to content

Commit 005ef2d

Browse files
committed
conservatively escape direct arguments of foreigncall
1 parent d35e715 commit 005ef2d

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
@@ -1104,13 +1104,15 @@ function escape_foreigncall!(astate::AnalysisState, pc::Int, args::Vector{Any})
11041104
add_escape_change!(astate, name, name_info)
11051105
add_liveness_change!(astate, name, pc)
11061106
for i = 1:nargs
1107+
# COMBAK
11071108
# we should escape this argument if it is directly called,
11081109
# otherwise just impose ThrownEscape if not nothrow
1109-
if argtypes[i] === Any
1110-
arg_info =
1111-
else
1112-
arg_info = nothrow ?: ThrownEscape(pc)
1113-
end
1110+
# if argtypes[i] === Any
1111+
# arg_info = ⊤
1112+
# else
1113+
# arg_info = nothrow ? ⊥ : ThrownEscape(pc)
1114+
# end
1115+
arg_info = nothrow ?:
11141116
add_escape_change!(astate, args[5+i], arg_info)
11151117
add_liveness_change!(astate, args[5+i], pc)
11161118
end

0 commit comments

Comments
 (0)