aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--erts/emulator/beam/beam_bp.c1
-rw-r--r--erts/etc/win32/erlsrv/erlsrv_interactive.c2
-rw-r--r--lib/dialyzer/src/dialyzer_analysis_callgraph.erl4
-rw-r--r--lib/stdlib/doc/src/erl_parse.xml19
-rw-r--r--lib/stdlib/src/erl_parse.yrl1
-rw-r--r--lib/stdlib/src/erl_scan.erl1
-rw-r--r--lib/stdlib/test/erl_scan_SUITE.erl28
-rw-r--r--lib/tools/emacs/erlang-start.el3
8 files changed, 53 insertions, 6 deletions
diff --git a/erts/emulator/beam/beam_bp.c b/erts/emulator/beam/beam_bp.c
index 9b17de34ec..ce025c9b6d 100644
--- a/erts/emulator/beam/beam_bp.c
+++ b/erts/emulator/beam/beam_bp.c
@@ -1580,6 +1580,7 @@ clear_function_break(BeamInstr *pc, Uint break_flags)
}
if (common & ERTS_BPF_META_TRACE) {
MatchSetUnref(bp->meta_ms);
+ bp_meta_unref(bp->meta_pid);
}
if (common & ERTS_BPF_COUNT) {
ASSERT((bp->flags & ERTS_BPF_COUNT_ACTIVE) == 0);
diff --git a/erts/etc/win32/erlsrv/erlsrv_interactive.c b/erts/etc/win32/erlsrv/erlsrv_interactive.c
index 736eabac79..3f7e20b923 100644
--- a/erts/etc/win32/erlsrv/erlsrv_interactive.c
+++ b/erts/etc/win32/erlsrv/erlsrv_interactive.c
@@ -525,7 +525,7 @@ int do_usage(char *arg0){
"list, give option -args as last option on command line "
"with\n"
"no arguments.\n\n");
- printf("Se Erlang documentation for full description.\n");
+ printf("See Erlang documentation for full description.\n");
return 0;
}
diff --git a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
index 86618a4915..ca6b403ac9 100644
--- a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
+++ b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
@@ -261,8 +261,8 @@ compile_and_store(Files, #analysis_state{codeserver = CServer,
dict:new(), NewFiles),
check_for_duplicate_modules(ModDict);
false ->
- Msg = io_lib:format("Could not scan the following file(s): ~p",
- [lists:flatten(Failed)]),
+ Msg = io_lib:format("Could not scan the following file(s):~n~s",
+ [[Reason || {_Filename, Reason} <- Failed]]),
exit({error, Msg})
end,
{T2, _} = statistics(runtime),
diff --git a/lib/stdlib/doc/src/erl_parse.xml b/lib/stdlib/doc/src/erl_parse.xml
index bafc2e0746..56a7131821 100644
--- a/lib/stdlib/doc/src/erl_parse.xml
+++ b/lib/stdlib/doc/src/erl_parse.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -167,6 +167,23 @@
<p>Converts the Erlang data structure <c><anno>Data</anno></c> into an
abstract form of type <c><anno>AbsTerm</anno></c>.
This is the inverse of <c>normalise/1</c>.</p>
+ <p><c>erl_parse:abstract(T)</c> is equivalent to
+ <c>erl_parse:abstract(T, 0)</c>.</p>
+ </desc>
+ </func>
+ <func>
+ <name name="abstract" arity="2"/>
+ <fsummary>Convert an Erlang term into an abstract form</fsummary>
+ <desc>
+ <p>Converts the Erlang data structure <c><anno>Data</anno></c> into an
+ abstract form of type <c><anno>AbsTerm</anno></c>.</p>
+ <p>The <c><anno>Line</anno></c> option is the line that will
+ be assigned to each node of the abstract form.</p>
+ <p>The <c><anno>Encoding</anno></c> option is used for
+ selecting which integer lists will be considered
+ as strings. The default is to use the encoding returned by
+ <seealso marker="epp#default_encoding/0">
+ <c>epp:default_encoding/0</c></seealso></p>
</desc>
</func>
</funcs>
diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl
index 9ff25fcbc5..7145b0858f 100644
--- a/lib/stdlib/src/erl_parse.yrl
+++ b/lib/stdlib/src/erl_parse.yrl
@@ -887,6 +887,7 @@ abstract(T, Options) when is_list(Options) ->
abstract(T, Line, Encoding).
-define(UNICODE(C),
+ is_integer(C) andalso
(C >= 0 andalso C < 16#D800 orelse
C > 16#DFFF andalso C < 16#FFFE orelse
C > 16#FFFF andalso C =< 16#10FFFF)).
diff --git a/lib/stdlib/src/erl_scan.erl b/lib/stdlib/src/erl_scan.erl
index 3651f608bc..d988a4d8c7 100644
--- a/lib/stdlib/src/erl_scan.erl
+++ b/lib/stdlib/src/erl_scan.erl
@@ -338,6 +338,7 @@ string_thing(_) -> "string".
-define(DIGIT(C), C >= $0, C =< $9).
-define(CHAR(C), is_integer(C), C >= 0).
-define(UNICODE(C),
+ is_integer(C) andalso
(C >= 0 andalso C < 16#D800 orelse
C > 16#DFFF andalso C < 16#FFFE orelse
C > 16#FFFF andalso C =< 16#10FFFF)).
diff --git a/lib/stdlib/test/erl_scan_SUITE.erl b/lib/stdlib/test/erl_scan_SUITE.erl
index ecd181e87c..361abbb771 100644
--- a/lib/stdlib/test/erl_scan_SUITE.erl
+++ b/lib/stdlib/test/erl_scan_SUITE.erl
@@ -21,7 +21,8 @@
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2]).
--export([ error_1/1, error_2/1, iso88591/1, otp_7810/1, otp_10302/1]).
+-export([ error_1/1, error_2/1, iso88591/1, otp_7810/1, otp_10302/1,
+ otp_10990/1, otp_10992/1]).
-import(lists, [nth/2,flatten/1]).
-import(io_lib, [print/1]).
@@ -60,7 +61,7 @@ end_per_testcase(_Case, Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [{group, error}, iso88591, otp_7810, otp_10302].
+ [{group, error}, iso88591, otp_7810, otp_10302, otp_10990, otp_10992].
groups() ->
[{error, [], [error_1, error_2]}].
@@ -1121,6 +1122,29 @@ otp_10302(Config) when is_list(Config) ->
erl_parse:abstract("a"++[1024]++"c", [{encoding,latin1}]),
ok.
+otp_10990(doc) ->
+ "OTP-10990. Floating point number in input string.";
+otp_10990(suite) ->
+ [];
+otp_10990(Config) when is_list(Config) ->
+ {'EXIT',_} = (catch {foo, erl_scan:string([$",42.0,$"],1)}),
+ ok.
+
+otp_10992(doc) ->
+ "OTP-10992. List of floats to abstract format.";
+otp_10992(suite) ->
+ [];
+otp_10992(Config) when is_list(Config) ->
+ {cons,0,{float,0,42.0},{nil,0}} =
+ erl_parse:abstract([42.0], [{encoding,unicode}]),
+ {cons,0,{float,0,42.0},{nil,0}} =
+ erl_parse:abstract([42.0], [{encoding,utf8}]),
+ {cons,0,{integer,0,65},{cons,0,{float,0,42.0},{nil,0}}} =
+ erl_parse:abstract([$A,42.0], [{encoding,unicode}]),
+ {cons,0,{integer,0,65},{cons,0,{float,0,42.0},{nil,0}}} =
+ erl_parse:abstract([$A,42.0], [{encoding,utf8}]),
+ ok.
+
test_string(String, Expected) ->
{ok, Expected, _End} = erl_scan:string(String),
test(String).
diff --git a/lib/tools/emacs/erlang-start.el b/lib/tools/emacs/erlang-start.el
index bbcea3e46a..e1dc86621e 100644
--- a/lib/tools/emacs/erlang-start.el
+++ b/lib/tools/emacs/erlang-start.el
@@ -83,6 +83,7 @@
;; Associate files extensions ".erl" and ".hrl" with Erlang mode.
;;
+;;;###autoload
(let ((a '("\\.erl\\'" . erlang-mode))
(b '("\\.hrl\\'" . erlang-mode)))
(or (assoc (car a) auto-mode-alist)
@@ -94,6 +95,7 @@
;; Associate files using interpreter "escript" with Erlang mode.
;;
+;;;###autoload
(add-to-list 'interpreter-mode-alist (cons "escript" 'erlang-mode))
;;
@@ -101,6 +103,7 @@
;; file completion.
;;
+;;;###autoload
(let ((erl-ext '(".jam" ".vee" ".beam")))
(while erl-ext
(let ((cie completion-ignored-extensions))