~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/dialyzer/src/dialyzer_succ_typings.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-08-05 20:54:29 UTC
  • mfrom: (6.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090805205429-pm4pnwew8axraosl
Tags: 1:13.b.1-dfsg-5
* Fixed parentheses in Emacs mode (closes: #536891).
* Removed unnecessary conflicts with erlang-manpages package.
* Added workaround for #475459: disabled threads on sparc architecture.
  This breaks wxErlang, so it's only a temporary solution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
127
127
  %% Check if there are contracts for functions that do not exist
128
128
  Warnings1 = 
129
129
    dialyzer_contracts:contracts_without_fun(Contracts, AllFuns, Callgraph),
130
 
  {Warnings2, FunTypes, InterModuleCalls, ModLocalCalls} =
 
130
  {Warnings2, FunTypes, RaceVarMap, RaceCode, PublicTables, NamedTables} =
131
131
    dialyzer_dataflow:get_warnings(Tree, Plt, Callgraph, Records, NoWarnUnused),
132
132
  NewDocPlt = insert_into_doc_plt(FunTypes, Callgraph, DocPlt),
133
133
  NewCallgraph =
134
 
    callgraph__renew_module_calls(InterModuleCalls, ModLocalCalls, Callgraph),
 
134
    callgraph__renew_race_stuff(RaceVarMap, RaceCode, PublicTables,
 
135
    NamedTables, Callgraph),
135
136
  State1 = st__renew_state_calls(NewCallgraph, State),
136
137
  get_warnings_from_modules(Ms, State1, NewDocPlt, [Warnings1,Warnings2|Acc]);
137
138
get_warnings_from_modules([], #st{plt = Plt}, DocPlt, Acc) ->
166
167
  AllFuns = collect_fun_info([Tree]),
167
168
  FunTypes = get_fun_types_from_plt(AllFuns, State),
168
169
  Records = dialyzer_codeserver:lookup_records(M, CodeServer),
169
 
  {NewFunTypes, InterModCalls, ModLocalCalls} =
 
170
  {NewFunTypes, RaceVarMap, RaceCode, PublicTables, NamedTables} =
170
171
    dialyzer_dataflow:get_fun_types(Tree, PLT, Callgraph, Records),
171
172
  NewCallgraph =
172
 
    callgraph__renew_module_calls(InterModCalls, ModLocalCalls, Callgraph),
 
173
    callgraph__renew_race_stuff(RaceVarMap, RaceCode, PublicTables,
 
174
    NamedTables, Callgraph),
173
175
  case reached_fixpoint(FunTypes, NewFunTypes) of
174
176
    true ->
175
177
      State1 = st__renew_state_calls(NewCallgraph, State),
181
183
      {NewState1, ordsets:from_list([FunLbl || {FunLbl,_Type} <- NotFixpoint])}
182
184
  end.
183
185
 
184
 
callgraph__renew_module_calls(InterModuleCalls, ModuleLocalCalls, Callgraph) ->
185
 
  Callgraph#dialyzer_callgraph{inter_module_calls = InterModuleCalls,
186
 
                               module_local_calls = ModuleLocalCalls}.
 
186
callgraph__renew_race_stuff(RaceVarMap, RaceCode, PublicTables,
 
187
                            NamedTables, Callgraph) ->
 
188
  Callgraph#dialyzer_callgraph{race_var_map = RaceVarMap,
 
189
                               race_code = RaceCode,
 
190
                               public_tables = PublicTables,
 
191
                               named_tables = NamedTables}.
187
192
 
188
193
st__renew_state_calls(Callgraph, State) ->
189
194
  State#st{callgraph = Callgraph}.
498
503
  ok.
499
504
 
500
505
-ifdef(DEBUG_PP).
501
 
debug_pp(Tree, Map) -> 
 
506
debug_pp(Tree, _Map) -> 
502
507
  Tree1 = strip_annotations(Tree),
503
508
  io:put_chars(cerl_prettypr:format(Tree1)),
504
509
  io:nl().