aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-05-02 12:32:39 +0200
committerHans Bolinder <[email protected]>2017-05-02 12:32:39 +0200
commit37decbb64953cd65bde2f7003ef5057dc0615ff1 (patch)
tree688444cfd1f1d4447c4216ebdaee2b838915931e /lib/dialyzer/src
parent22e7443d9df041185944a7d49b30459ba4609849 (diff)
parent0298a195873c606ac885d37f54a098eca3d7905a (diff)
downloadotp-37decbb64953cd65bde2f7003ef5057dc0615ff1.tar.gz
otp-37decbb64953cd65bde2f7003ef5057dc0615ff1.tar.bz2
otp-37decbb64953cd65bde2f7003ef5057dc0615ff1.zip
Merge branch 'maint-19' into maint
* maint-19: Updated OTP version Prepare release inets: Add missing release note dialyzer: Fix a bug regarding unknown types erl_mseg.c: don't use invalid indices in - > cache_powered_node[] Fix release note for OTP-14290
Diffstat (limited to 'lib/dialyzer/src')
-rw-r--r--lib/dialyzer/src/dialyzer_analysis_callgraph.erl18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
index 784e427154..7f8e68908e 100644
--- a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
+++ b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
@@ -160,7 +160,7 @@ analysis_start(Parent, Analysis, LegalWarnings) ->
dialyzer_codeserver:finalize_exported_types(MergedExpTypes, TmpCServer1),
erlang:garbage_collect(),
?timing(State#analysis_state.timing_server, "remote",
- contracts_and_records(TmpCServer2))
+ contracts_and_records(TmpCServer2, Parent))
catch
throw:{error, _ErrorMsg} = Error -> exit(Error)
end,
@@ -185,15 +185,14 @@ analysis_start(Parent, Analysis, LegalWarnings) ->
State2 = analyze_callgraph(NewCallgraph, State1),
#analysis_state{plt = MiniPlt2, doc_plt = DocPlt} = State2,
dialyzer_callgraph:dispose_race_server(NewCallgraph),
- rcv_and_send_ext_types(Parent),
%% Since the PLT is never used, a dummy is sent:
DummyPlt = dialyzer_plt:new(),
send_codeserver_plt(Parent, CServer, DummyPlt),
MiniPlt3 = dialyzer_plt:delete_list(MiniPlt2, NonExportsList),
send_analysis_done(Parent, MiniPlt3, DocPlt).
-contracts_and_records(CodeServer) ->
- Fun = contrs_and_recs(CodeServer),
+contracts_and_records(CodeServer, Parent) ->
+ Fun = contrs_and_recs(CodeServer, Parent),
{Pid, Ref} = erlang:spawn_monitor(Fun),
dialyzer_codeserver:give_away(CodeServer, Pid),
Pid ! {self(), go},
@@ -201,18 +200,19 @@ contracts_and_records(CodeServer) ->
Return
end.
--spec contrs_and_recs(dialyzer_codeserver:codeserver()) ->
+-spec contrs_and_recs(dialyzer_codeserver:codeserver(), pid()) ->
fun(() -> no_return()).
-contrs_and_recs(TmpCServer2) ->
+contrs_and_recs(TmpCServer2, Parent) ->
fun() ->
- Parent = receive {Pid, go} -> Pid end,
+ Caller = receive {Pid, go} -> Pid end,
{TmpCServer3, RecordDict} =
dialyzer_utils:process_record_remote_types(TmpCServer2),
TmpServer4 =
dialyzer_contracts:process_contract_remote_types(TmpCServer3,
RecordDict),
dialyzer_codeserver:give_away(TmpServer4, Parent),
+ rcv_and_send_ext_types(Caller, Parent),
exit(TmpServer4)
end.
@@ -554,13 +554,13 @@ default_includes(Dir) ->
%% Handle Messages
%%-------------------------------------------------------------------
-rcv_and_send_ext_types(Parent) ->
+rcv_and_send_ext_types(SendTo, Parent) ->
Self = self(),
Self ! {Self, done},
case rcv_ext_types(Self, []) of
[] -> ok;
ExtTypes ->
- Parent ! {Self, ext_types, ExtTypes},
+ Parent ! {SendTo, ext_types, ExtTypes},
ok
end.