Skip to content

Commit

Permalink
conservatively escape direct arguments of foreigncall
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Jan 24, 2022
1 parent 11a386a commit ad727df
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions base/compiler/ssair/EscapeAnalysis/EscapeAnalysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1234,13 +1234,15 @@ function escape_foreigncall!(astate::AnalysisState, pc::Int, args::Vector{Any})
add_escape_change!(astate, name, name_info)
add_liveness_change!(astate, name, pc)
for i = 1:nargs
# COMBAK
# we should escape this argument if it is directly called,
# otherwise just impose ThrownEscape if not nothrow
if argtypes[i] === Any
arg_info =
else
arg_info = nothrow ?: ThrownEscape(pc)
end
# if argtypes[i] === Any
# arg_info = ⊤
# else
# arg_info = nothrow ? ⊥ : ThrownEscape(pc)
# end
arg_info = nothrow ?:
add_escape_change!(astate, args[5+i], arg_info)
add_liveness_change!(astate, args[5+i], pc)
end
Expand Down

0 comments on commit ad727df

Please sign in to comment.