aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/dialyzer/src/dialyzer_dep.erl62
-rw-r--r--lib/dialyzer/vsn.mk2
-rw-r--r--lib/reltool/doc/src/notes.xml10
-rw-r--r--lib/reltool/doc/src/reltool.xml10
-rw-r--r--lib/ssl/test/ssl_test_lib.erl6
-rw-r--r--lib/syntax_tools/doc/src/notes.xml4
-rw-r--r--lib/syntax_tools/vsn.mk2
7 files changed, 52 insertions, 44 deletions
diff --git a/lib/dialyzer/src/dialyzer_dep.erl b/lib/dialyzer/src/dialyzer_dep.erl
index 6678037bc0..273c05c54c 100644
--- a/lib/dialyzer/src/dialyzer_dep.erl
+++ b/lib/dialyzer/src/dialyzer_dep.erl
@@ -59,8 +59,14 @@
%% separately.
%%
--spec analyze(cerl:c_module()) ->
- {dict:dict(), ordsets:ordset('external' | label()), dict:dict(), dict:dict()}.
+-type dep_ordset() :: ordsets:ordset(label() | 'external').
+
+-type deps() :: dict:dict(label() | 'external' | 'top', dep_ordset()).
+-type esc() :: dep_ordset().
+-type calls() :: dict:dict(label(), ordsets:ordset(label())).
+-type letrecs() :: dict:dict(label(), label()).
+
+-spec analyze(cerl:c_module()) -> {deps(), esc(), calls(), letrecs()}.
analyze(Tree) ->
%% io:format("Handling ~w\n", [cerl:atom_val(cerl:module_name(Tree))]),
@@ -79,22 +85,26 @@ traverse(Tree, Out, State, CurrentFun) ->
apply ->
Op = cerl:apply_op(Tree),
Args = cerl:apply_args(Tree),
- %% Op is always a variable and should not be marked as escaping
- %% based on its use.
case var =:= cerl:type(Op) of
- false -> erlang:error({apply_op_not_a_variable, cerl:type(Op)});
- true -> ok
- end,
- OpFuns = case map__lookup(cerl_trees:get_label(Op), Out) of
- none -> output(none);
- {value, OF} -> OF
- end,
- {ArgFuns, State2} = traverse_list(Args, Out, State, CurrentFun),
- State3 = state__add_esc(merge_outs(ArgFuns), State2),
- State4 = state__add_deps(CurrentFun, OpFuns, State3),
- State5 = state__store_callsite(cerl_trees:get_label(Tree),
- OpFuns, length(Args), State4),
- {output(set__singleton(external)), State5};
+ false ->
+ %% We have discovered an error here, but we ignore it and let
+ %% later passes handle it; we do not modify the dependencies.
+ %% erlang:error({apply_op_not_a_variable, cerl:type(Op)});
+ {output(none), State};
+ true ->
+ %% Op is a variable and should not be marked as escaping
+ %% based on its use.
+ OpFuns = case map__lookup(cerl_trees:get_label(Op), Out) of
+ none -> output(none);
+ {value, OF} -> OF
+ end,
+ {ArgFuns, State2} = traverse_list(Args, Out, State, CurrentFun),
+ State3 = state__add_esc(merge_outs(ArgFuns), State2),
+ State4 = state__add_deps(CurrentFun, OpFuns, State3),
+ State5 = state__store_callsite(cerl_trees:get_label(Tree),
+ OpFuns, length(Args), State4),
+ {output(set__singleton(external)), State5}
+ end;
binary ->
{output(none), State};
'case' ->
@@ -481,11 +491,11 @@ all_vars(Tree, AccIn) ->
-type local_set() :: 'none' | #set{}.
--record(state, {deps :: dict:dict(),
+-record(state, {deps :: deps(),
esc :: local_set(),
- call :: dict:dict(),
- arities :: dict:dict(),
- letrecs :: dict:dict()}).
+ calls :: calls(),
+ arities :: dict:dict(label() | 'top', arity()),
+ letrecs :: letrecs()}).
state__new(Tree) ->
Exports = set__from_list([X || X <- cerl:module_exports(Tree)]),
@@ -503,7 +513,7 @@ state__new(Tree) ->
%% init the escaping function labels to exported + called from on_load
InitEsc = set__from_list(OnLoadLs ++ ExpLs),
Arities = cerl_trees:fold(fun find_arities/2, dict:new(), Tree),
- #state{deps = map__new(), esc = InitEsc, call = map__new(),
+ #state{deps = map__new(), esc = InitEsc, calls = map__new(),
arities = Arities, letrecs = map__new()}.
find_arities(Tree, AccMap) ->
@@ -518,7 +528,7 @@ find_arities(Tree, AccMap) ->
state__add_deps(_From, #output{content = none}, State) ->
State;
-state__add_deps(From, #output{type = single, content=To},
+state__add_deps(From, #output{type = single, content = To},
#state{deps = Map} = State) ->
%% io:format("Adding deps from ~w to ~w\n", [From, set__to_ordsets(To)]),
State#state{deps = map__add(From, To, Map)}.
@@ -544,16 +554,16 @@ state__esc(#state{esc = Esc}) ->
state__store_callsite(_From, #output{content = none}, _CallArity, State) ->
State;
state__store_callsite(From, To, CallArity,
- #state{call = Calls, arities = Arities} = State) ->
+ #state{calls = Calls, arities = Arities} = State) ->
Filter = fun(external) -> true;
(Fun) -> CallArity =:= dict:fetch(Fun, Arities)
end,
case filter_outs(To, Filter) of
#output{content = none} -> State;
- To1 -> State#state{call = map__store(From, To1, Calls)}
+ To1 -> State#state{calls = map__store(From, To1, Calls)}
end.
-state__calls(#state{call = Calls}) ->
+state__calls(#state{calls = Calls}) ->
Calls.
%%------------------------------------------------------------
diff --git a/lib/dialyzer/vsn.mk b/lib/dialyzer/vsn.mk
index 77ea9d0413..077fe01e85 100644
--- a/lib/dialyzer/vsn.mk
+++ b/lib/dialyzer/vsn.mk
@@ -1 +1 @@
-DIALYZER_VSN = 2.10
+DIALYZER_VSN = 3.0
diff --git a/lib/reltool/doc/src/notes.xml b/lib/reltool/doc/src/notes.xml
index 082079aa74..0a83954865 100644
--- a/lib/reltool/doc/src/notes.xml
+++ b/lib/reltool/doc/src/notes.xml
@@ -194,7 +194,6 @@
<section><title>Fixed Bugs and Malfunctions</title>
<list>
<item>
- <p>
<list> <item> If <c>incl_cond</c> was set to
<c>derived</c> on module level, then reltool_server would
crash with a <c>case_clause</c>. This has been corrected.
@@ -225,7 +224,7 @@
implemented in reltool. </item> <item> Instead of only
looking at the directory name, reltool now first looks
for a <c>.app</c> file in order to figure out the name of
- an application. </item> </list></p>
+ an application. </item> </list>
<p>
Own Id: OTP-10012 Aux Id: kunagi-171 [82] </p>
</item>
@@ -272,7 +271,6 @@
<section><title>Fixed Bugs and Malfunctions</title>
<list>
<item>
- <p>
Miscellaneous corrections: <list> <item> Start of reltool
GUI would sometimes crash with a badmatch in
reltool_sys_win:do_init. This has been corrected. </item>
@@ -311,7 +309,7 @@
and when generating target system. </item> <item> Title
of dependecies column in app and mod window is changed
from "Modules used by others" to "Modules using this".
- </item> </list></p>
+ </item> </list>
<p>
Own Id: OTP-9792</p>
</item>
@@ -338,7 +336,7 @@
</item>
<item>
<p>
- Some bug fixes related to the handling of escripts:
+ Some bug fixes related to the handling of escripts:</p>
<list> <item> Reltool could not handle escripts with
inlined applications. This has been corrected. Inlined
applications will be visible in the GUI, but not possible
@@ -357,7 +355,7 @@
another escript, for which the name sorts before the
existing one, would cause reltool to fail saying
"Application name clash". This has been corrected.
- </item> </list></p>
+ </item> </list>
<p>
Own Id: OTP-9968</p>
</item>
diff --git a/lib/reltool/doc/src/reltool.xml b/lib/reltool/doc/src/reltool.xml
index f4effc3f2e..38448e7961 100644
--- a/lib/reltool/doc/src/reltool.xml
+++ b/lib/reltool/doc/src/reltool.xml
@@ -248,7 +248,7 @@
<p>When starting this release, three things must be specified:</p>
<taglist>
- <tag><b>Which <c>releases</c> directory to use</b></tag>
+ <tag><em>Which <c>releases</c> directory to use</em></tag>
<item>Tell the release handler to use the <c>releases</c>
directory in our target structure instead of
<c>$OTP_ROOT/releases</c>. This is done by setting the SASL
@@ -257,7 +257,7 @@
&lt;target-dir&gt;/releases</c>) or in
<c>sys.config</c>.</item>
- <tag><b>Which boot file to use</b></tag>
+ <tag><em>Which boot file to use</em></tag>
<item>The default boot file is <c>$OTP_ROOT/bin/start</c>,
but in this case we need to specify a boot file from our
target structure, typically
@@ -265,7 +265,7 @@
is done with the <c>-boot</c> command line option to
<c>erl</c></item>
- <tag><b>The location of our applications</b></tag>
+ <tag><em>The location of our applications</em></tag>
<item>The generated .script (and .boot) file uses the
environment variable <c>$RELTOOL_EXT_LIB</c> as prefix for
the paths to all applications. The <c>-boot_var</c> option
@@ -275,8 +275,8 @@
</taglist>
<p>Example:</p>
- <p><code>erl -sasl releases_dir \"mytarget/releases\" -boot mytarget/releases/1.0/myrel\
- -boot_var RELTOOL_EXT_LIB mytarget/lib</code></p>
+ <code>erl -sasl releases_dir \"mytarget/releases\" -boot mytarget/releases/1.0/myrel\
+ -boot_var RELTOOL_EXT_LIB mytarget/lib</code>
</item>
<tag><c>incl_sys_filters</c></tag>
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index 38cc3532d8..02fdc4330f 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -386,11 +386,11 @@ cert_options(Config) ->
SNIServerBCertFile = filename:join([?config(priv_dir, Config), "b.server", "cert.pem"]),
SNIServerBKeyFile = filename:join([?config(priv_dir, Config), "b.server", "key.pem"]),
[{client_opts, []},
- {client_verification_opts, [{cacertfile, ClientCaCertFile},
+ {client_verification_opts, [{cacertfile, ServerCaCertFile},
{certfile, ClientCertFile},
{keyfile, ClientKeyFile},
{ssl_imp, new}]},
- {client_verification_opts_digital_signature_only, [{cacertfile, ClientCaCertFile},
+ {client_verification_opts_digital_signature_only, [{cacertfile, ServerCaCertFile},
{certfile, ClientCertFileDigitalSignatureOnly},
{keyfile, ClientKeyFile},
{ssl_imp, new}]},
@@ -426,7 +426,7 @@ cert_options(Config) ->
{user_lookup_fun, {fun user_lookup/3, undefined}},
{ciphers, srp_anon_suites()}]},
{server_verification_opts, [{ssl_imp, new},{reuseaddr, true},
- {cacertfile, ServerCaCertFile},
+ {cacertfile, ClientCaCertFile},
{certfile, ServerCertFile}, {keyfile, ServerKeyFile}]},
{client_kc_opts, [{certfile, ClientKeyCertFile}, {ssl_imp, new}]},
{server_kc_opts, [{ssl_imp, new},{reuseaddr, true},
diff --git a/lib/syntax_tools/doc/src/notes.xml b/lib/syntax_tools/doc/src/notes.xml
index 406a6c071b..78b2c7c7a4 100644
--- a/lib/syntax_tools/doc/src/notes.xml
+++ b/lib/syntax_tools/doc/src/notes.xml
@@ -76,11 +76,11 @@
<p>
Teach Maps to erl_syntax</p>
<p>
- Affected functions: <list>
+ Affected functions:</p> <list>
<item>erl_syntax:abstract/1</item>
<item>erl_syntax:concrete/1</item>
<item>erl_syntax:is_leaf/1</item>
- <item>erl_syntax:is_literal/1</item> </list></p>
+ <item>erl_syntax:is_literal/1</item> </list>
<p>
Own Id: OTP-12265</p>
</item>
diff --git a/lib/syntax_tools/vsn.mk b/lib/syntax_tools/vsn.mk
index 403e90196e..f09c2a01d0 100644
--- a/lib/syntax_tools/vsn.mk
+++ b/lib/syntax_tools/vsn.mk
@@ -1 +1 @@
-SYNTAX_TOOLS_VSN = 1.7
+SYNTAX_TOOLS_VSN = 2.0