aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_callgraph.erl
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2012-02-16 16:03:51 +0100
committerHenrik Nord <[email protected]>2012-05-21 15:31:17 +0200
commitffadf7f6f8a113fbcc42a2be36d2dd5c841d48e3 (patch)
treea81087857f76805ac1f0dd56daa658b7956cc57a /lib/dialyzer/src/dialyzer_callgraph.erl
parente6fa01359a41d3b054260d01d2880820c867ca2b (diff)
downloadotp-ffadf7f6f8a113fbcc42a2be36d2dd5c841d48e3.tar.gz
otp-ffadf7f6f8a113fbcc42a2be36d2dd5c841d48e3.tar.bz2
otp-ffadf7f6f8a113fbcc42a2be36d2dd5c841d48e3.zip
Moving code between callgraph & dataflow
Diffstat (limited to 'lib/dialyzer/src/dialyzer_callgraph.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_callgraph.erl9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/dialyzer/src/dialyzer_callgraph.erl b/lib/dialyzer/src/dialyzer_callgraph.erl
index 1cbb83a44a..ddda27adb4 100644
--- a/lib/dialyzer/src/dialyzer_callgraph.erl
+++ b/lib/dialyzer/src/dialyzer_callgraph.erl
@@ -48,6 +48,7 @@
get_required_by/2,
in_neighbours/2,
renew_race_info/4,
+ renew_race_code/2,
reset_from_funs/2,
scan_core_tree/2,
strip_module_deps/2,
@@ -239,6 +240,14 @@ renew_race_info(CG, RaceCode, PublicTables, NamedTables) ->
public_tables = PublicTables,
named_tables = NamedTables}.
+-spec renew_race_code(dialyzer_races:races(), callgraph()) -> callgraph().
+
+renew_race_code(Races, #callgraph{race_code = RaceCode} = Callgraph) ->
+ Fun = dialyzer_races:get_curr_fun(Races),
+ FunArgs = dialyzer_races:get_curr_fun_args(Races),
+ Code = lists:reverse(dialyzer_races:get_race_list(Races)),
+ Callgraph#callgraph{race_code = dict:store(Fun, [FunArgs, Code], RaceCode)}.
+
-spec get_depends_on(scc(), callgraph()) -> [scc()].
get_depends_on(SCC, #callgraph{active_digraph = DG}) ->