aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_callgraph.erl
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2012-02-17 18:47:58 +0100
committerHenrik Nord <[email protected]>2012-05-21 15:31:18 +0200
commit12c5985b862c5e8e7e88033a21e909b51225d76f (patch)
tree3861d1f34344a875cfe1c149b7e4056dab570ba3 /lib/dialyzer/src/dialyzer_callgraph.erl
parent15529b1392c3c3d452dcae3ce6786ff41fda9f13 (diff)
downloadotp-12c5985b862c5e8e7e88033a21e909b51225d76f.tar.gz
otp-12c5985b862c5e8e7e88033a21e909b51225d76f.tar.bz2
otp-12c5985b862c5e8e7e88033a21e909b51225d76f.zip
Parallel dataflow
Diffstat (limited to 'lib/dialyzer/src/dialyzer_callgraph.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_callgraph.erl9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/dialyzer/src/dialyzer_callgraph.erl b/lib/dialyzer/src/dialyzer_callgraph.erl
index 7379fbc3c4..385f5621d6 100644
--- a/lib/dialyzer/src/dialyzer_callgraph.erl
+++ b/lib/dialyzer/src/dialyzer_callgraph.erl
@@ -262,9 +262,8 @@ module_postorder(#callgraph{digraph = DG}) ->
MDG = digraph:new([acyclic]),
MDG1 = digraph_confirm_vertices(Nodes, MDG),
MDG2 = create_module_digraph(Edges, MDG1),
- PostOrder = digraph_utils:postorder(MDG2),
- digraph:delete(MDG2),
- PostOrder.
+ PostOrder = digraph_utils:topsort(MDG2),
+ {PostOrder, MDG2}.
%% The module deps of a module are modules that depend on the module
-spec module_deps(callgraph()) -> dict().
@@ -341,9 +340,9 @@ reset_from_funs(Funs, #callgraph{digraph = DG,
module_postorder_from_funs(Funs, #callgraph{digraph = DG} = CG) ->
SubGraph = digraph_reaching_subgraph(Funs, DG),
- PO = module_postorder(CG#callgraph{digraph = SubGraph}),
+ {PO, Active} = module_postorder(CG#callgraph{digraph = SubGraph}),
digraph_delete(SubGraph),
- PO.
+ {PO, CG#callgraph{active_digraph = Active}}.
ets_lookup_dict(Key, Table) ->
try ets:lookup_element(Table, Key, 2) of