diff options
author | Stavros Aronis <[email protected]> | 2012-02-21 16:01:50 +0100 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2012-05-21 15:31:19 +0200 |
commit | 0bae6c82503b348e62f11edfbfc880145ef06794 (patch) | |
tree | 187d13895bab4438d6e3d5c5b099dae0280fa1ad /lib/dialyzer/src/dialyzer_coordinator.erl | |
parent | cf573e2ea378bae4c43007fb457dcd8379caf547 (diff) | |
download | otp-0bae6c82503b348e62f11edfbfc880145ef06794.tar.gz otp-0bae6c82503b348e62f11edfbfc880145ef06794.tar.bz2 otp-0bae6c82503b348e62f11edfbfc880145ef06794.zip |
Avoid digraph_utils:condensation and ordering in typesig
Diffstat (limited to 'lib/dialyzer/src/dialyzer_coordinator.erl')
-rw-r--r-- | lib/dialyzer/src/dialyzer_coordinator.erl | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/dialyzer/src/dialyzer_coordinator.erl b/lib/dialyzer/src/dialyzer_coordinator.erl index 437af69f5a..9d31c739d0 100644 --- a/lib/dialyzer/src/dialyzer_coordinator.erl +++ b/lib/dialyzer/src/dialyzer_coordinator.erl @@ -123,8 +123,8 @@ sccs_to_pids_request(SCCs, Coordinator) -> cast({sccs_to_pids, SCCs, self()}, Coordinator). scc_to_pids_request_handle(Worker, SCCs, SCCtoPID) -> - Pids = [fetch_map(SCC, SCCtoPID) || SCC <- SCCs], - Worker ! {sccs_to_pids, Pids}, + Result = map_lookup(SCCs, SCCtoPID), + Worker ! {sccs_to_pids, Result}, ok. -spec sccs_to_pids_reply() -> [dialyzer_worker:worker()]. @@ -314,5 +314,12 @@ new_map() -> store_map(Key, Value, Map) -> dict:store(Key, Value, Map). -fetch_map(Key, Map) -> - dict:fetch(Key, Map). +map_lookup(SCCs, Map) -> + Fold = + fun(Key, {Mapped, Unknown}) -> + case dict:find(Key, Map) of + {ok, Value} -> {[Value|Mapped], Unknown}; + error -> {Mapped, [Key|Unknown]} + end + end, + lists:foldl(Fold, {[], []}, SCCs). |