aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_cl.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dialyzer/src/dialyzer_cl.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_cl.erl29
1 files changed, 5 insertions, 24 deletions
diff --git a/lib/dialyzer/src/dialyzer_cl.erl b/lib/dialyzer/src/dialyzer_cl.erl
index d72ae1dc86..0617be6435 100644
--- a/lib/dialyzer/src/dialyzer_cl.erl
+++ b/lib/dialyzer/src/dialyzer_cl.erl
@@ -637,8 +637,8 @@ cl_loop(State, LogCache) ->
{BackendPid, cserver, CodeServer, _Plt} -> % Plt is ignored
NewState = State#cl_state{code_server = CodeServer},
cl_loop(NewState, LogCache);
- {BackendPid, done, NewMiniPlt, _NewDocPlt} ->
- return_value(State, NewMiniPlt);
+ {BackendPid, done, NewPlt, _NewDocPlt} ->
+ return_value(State, NewPlt);
{BackendPid, ext_calls, ExtCalls} ->
cl_loop(State#cl_state{external_calls = ExtCalls}, LogCache);
{BackendPid, ext_types, ExtTypes} ->
@@ -700,7 +700,7 @@ return_value(State = #cl_state{code_server = CodeServer,
output_plt = OutputPlt,
plt_info = PltInfo,
stored_warnings = StoredWarnings},
- MiniPlt) ->
+ Plt) ->
%% Just for now:
case CodeServer =:= none of
true ->
@@ -710,18 +710,9 @@ return_value(State = #cl_state{code_server = CodeServer,
end,
case OutputPlt =:= none of
true ->
- dialyzer_plt:delete(MiniPlt);
+ dialyzer_plt:delete(Plt);
false ->
- Fun = to_file_fun(OutputPlt, MiniPlt, ModDeps, PltInfo),
- {Pid, Ref} = erlang:spawn_monitor(Fun),
- dialyzer_plt:give_away(MiniPlt, Pid),
- Pid ! go,
- receive {'DOWN', Ref, process, Pid, Result} ->
- case Result of
- ok -> ok;
- Thrown -> throw(Thrown)
- end
- end
+ dialyzer_plt:to_file(OutputPlt, Plt, ModDeps, PltInfo)
end,
UnknownWarnings = unknown_warnings(State),
RetValue =
@@ -742,16 +733,6 @@ return_value(State = #cl_state{code_server = CodeServer,
{RetValue, set_warning_id(AllWarnings)}
end.
--spec to_file_fun(_, _, _, _) -> fun(() -> no_return()).
-
-to_file_fun(Filename, MiniPlt, ModDeps, PltInfo) ->
- fun() ->
- receive go -> ok end,
- Plt = dialyzer_plt:restore_full_plt(MiniPlt),
- dialyzer_plt:to_file(Filename, Plt, ModDeps, PltInfo),
- exit(ok)
- end.
-
unknown_warnings(State = #cl_state{legal_warnings = LegalWarnings}) ->
Unknown = case ordsets:is_element(?WARN_UNKNOWN, LegalWarnings) of
true ->