summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--OTP_VERSION2
-rw-r--r--bootstrap/lib/stdlib/ebin/otp_internal.beambin8900 -> 8900 bytes
-rw-r--r--erts/doc/src/erlang.xml19
-rw-r--r--erts/emulator/beam/bif.c18
-rw-r--r--erts/emulator/beam/bif.tab1
-rw-r--r--erts/emulator/test/exception_SUITE.erl3
-rw-r--r--erts/preloaded/ebin/erlang.beambin108992 -> 108908 bytes
-rw-r--r--erts/preloaded/src/erlang.erl13
-rw-r--r--lib/compiler/test/trycatch_SUITE.erl4
-rw-r--r--lib/hipe/doc/src/HiPE_app.xml3
-rw-r--r--lib/stdlib/src/erl_parse.yrl170
-rw-r--r--lib/stdlib/src/otp_internal.erl4
-rw-r--r--lib/tools/emacs/erlang.el1
-rw-r--r--make/otp_version_tickets_in_merge6
-rw-r--r--system/doc/general_info/DEPRECATIONS1
15 files changed, 76 insertions, 169 deletions
diff --git a/OTP_VERSION b/OTP_VERSION
index c471f62163..1c847c53ee 100644
--- a/OTP_VERSION
+++ b/OTP_VERSION
@@ -1 +1 @@
-23.0.1
+24.0-rc0
diff --git a/bootstrap/lib/stdlib/ebin/otp_internal.beam b/bootstrap/lib/stdlib/ebin/otp_internal.beam
index 547f105df8..c712df50d0 100644
--- a/bootstrap/lib/stdlib/ebin/otp_internal.beam
+++ b/bootstrap/lib/stdlib/ebin/otp_internal.beam
Binary files differ
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 67d7a07bae..9b2605d3e4 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -2147,25 +2147,6 @@ true</pre>
</func>
<func>
- <name name="get_stacktrace" arity="0" since=""/>
- <fsummary>Get the call stack back-trace of the last exception.</fsummary>
- <type name="stack_item"/>
- <desc>
- <warning><p><c>erlang:get_stacktrace/0</c> is deprecated and
- will be removed in OTP 24. Starting from OTP 23,
- <c>erlang:get_stacktrace/0</c> returns <c>[]</c>.</p></warning>
- <p>Instead of using <c>erlang:get_stacktrace/0</c> to retrieve
- the call stack back-trace, use the following syntax:</p>
-<pre>
-try Expr
-catch
- Class:Reason:Stacktrace ->
- {Class,Reason,Stacktrace}
-end</pre>
- </desc>
- </func>
-
- <func>
<name name="group_leader" arity="0" since=""/>
<fsummary>Get the group leader for the calling process.</fsummary>
<desc>
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index 5beab81b98..aafd25e4ea 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -1032,13 +1032,6 @@ BIF_RETTYPE hibernate_3(BIF_ALIST_3)
}
/**********************************************************************/
-
-BIF_RETTYPE get_stacktrace_0(BIF_ALIST_0)
-{
- BIF_RET(NIL);
-}
-
-/**********************************************************************/
/*
* This is like exit/1, except that errors are logged if they terminate
* the process, and the final error value will be {Term,StackTrace}.
@@ -1132,12 +1125,11 @@ BIF_RETTYPE raise_3(BIF_ALIST_3)
reason = EXC_THROWN;
} else goto error;
reason &= ~EXF_SAVETRACE;
-
- /* Check syntax of stacktrace, and count depth.
- * Accept anything that can be returned from erlang:get_stacktrace/0,
- * as well as a 2-tuple with a fun as first element that the
- * error_handler may need to give us. Also allow old-style
- * MFA three-tuples.
+
+ /* Check syntax of stacktrace, and count depth. Accept anything
+ * that can be returned from a stacktrace from try/catch, as well
+ * as a 2-tuple with a fun as first element that the error_handler
+ * may need to give us. Also allow old-style MFA three-tuples.
*/
for (l = stacktrace, depth = 0;
is_list(l);
diff --git a/erts/emulator/beam/bif.tab b/erts/emulator/beam/bif.tab
index 5fb8441a15..c55189f8a7 100644
--- a/erts/emulator/beam/bif.tab
+++ b/erts/emulator/beam/bif.tab
@@ -283,7 +283,6 @@ bif erts_internal:is_process_alive/2
bif erlang:error/1 error_1
bif erlang:error/2 error_2
bif erlang:raise/3 raise_3
-bif erlang:get_stacktrace/0
bif erlang:is_builtin/3
diff --git a/erts/emulator/test/exception_SUITE.erl b/erts/emulator/test/exception_SUITE.erl
index 5dfa9bb4e0..4d20e1cef3 100644
--- a/erts/emulator/test/exception_SUITE.erl
+++ b/erts/emulator/test/exception_SUITE.erl
@@ -327,7 +327,6 @@ stacktrace_1(X, C1, Y) ->
C1 -> value1
catch
C1:D1:Stk1 ->
- [] = erlang:get_stacktrace(),
{caught1,D1,Stk1}
after
foo(Y)
@@ -335,7 +334,6 @@ stacktrace_1(X, C1, Y) ->
V2 -> {value2,V2}
catch
C2:D2:Stk2 ->
- [] = erlang:get_stacktrace(),
{caught2,{C2,D2},Stk2}
after
ok
@@ -462,7 +460,6 @@ my_abs(X) -> abs(X).
gunilla(Config) when is_list(Config) ->
{throw,kalle} = gunilla_1(),
- [] = erlang:get_stacktrace(),
ok.
gunilla_1() ->
diff --git a/erts/preloaded/ebin/erlang.beam b/erts/preloaded/ebin/erlang.beam
index 61e841b703..9bf538de29 100644
--- a/erts/preloaded/ebin/erlang.beam
+++ b/erts/preloaded/ebin/erlang.beam
Binary files differ
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl
index a9d8803575..c3d3e387e3 100644
--- a/erts/preloaded/src/erlang.erl
+++ b/erts/preloaded/src/erlang.erl
@@ -54,13 +54,13 @@
dist_ctrl_set_opt/3,
dist_get_stat/1]).
--deprecated([{get_stacktrace,0,
- "use the new try/catch syntax for retrieving the "
- "stack backtrace"}]).
-deprecated([{now,0,
"see the \"Time and Time Correction in Erlang\" "
"chapter of the ERTS User's Guide for more information"}]).
-removed([{hash,2,"use erlang:phash2/2 instead"}]).
+-removed([{get_stacktrace,0,
+ "use the new try/catch syntax for retrieving the "
+ "stack backtrace"}]).
%% Get rid of autoimports of spawn to avoid clashes with ourselves.
-compile({no_auto_import,[spawn_link/1]}).
@@ -146,7 +146,7 @@
-export([fun_info/2, fun_info_mfa/1, fun_to_list/1, function_exported/3]).
-export([garbage_collect/0, garbage_collect/1, garbage_collect/2]).
-export([garbage_collect_message_area/0, get/0, get/1, get_keys/0, get_keys/1]).
--export([get_module_info/1, get_stacktrace/0, group_leader/0]).
+-export([get_module_info/1, group_leader/0]).
-export([group_leader/2]).
-export([halt/0, halt/1, halt/2,
has_prepared_code_on_load/1, hibernate/3]).
@@ -1063,11 +1063,6 @@ get_keys(_Val) ->
get_module_info(_Module) ->
erlang:nif_error(undefined).
-%% get_stacktrace/0
--spec erlang:get_stacktrace() -> [stack_item()].
-get_stacktrace() ->
- erlang:nif_error(undefined).
-
%% group_leader/0
-spec group_leader() -> pid().
group_leader() ->
diff --git a/lib/compiler/test/trycatch_SUITE.erl b/lib/compiler/test/trycatch_SUITE.erl
index 18926a23ee..148969a4d1 100644
--- a/lib/compiler/test/trycatch_SUITE.erl
+++ b/lib/compiler/test/trycatch_SUITE.erl
@@ -1141,7 +1141,6 @@ stacktrace(_Config) ->
error:{badmatch,_}:Stk2 ->
[{?MODULE,stacktrace_2,0,_},
{?MODULE,stacktrace,1,_}|_] = Stk2,
- [] = erlang:get_stacktrace(),
ok
end,
@@ -1149,7 +1148,6 @@ stacktrace(_Config) ->
stacktrace_3(a, b)
catch
error:function_clause:Stk3 ->
- [] = erlang:get_stacktrace(),
case lists:module_info(native) of
false ->
[{lists,prefix,[a,b],_}|_] = Stk3;
@@ -1170,7 +1168,6 @@ stacktrace_1(X, C1, Y) ->
C1 -> value1
catch
C1:D1:Stk1 ->
- [] = erlang:get_stacktrace(),
{caught1,D1,Stk1}
after
foo(Y)
@@ -1178,7 +1175,6 @@ stacktrace_1(X, C1, Y) ->
V2 -> {value2,V2}
catch
C2:D2:Stk2 ->
- [] = erlang:get_stacktrace(),
{caught2,{C2,D2},Stk2}
end.
diff --git a/lib/hipe/doc/src/HiPE_app.xml b/lib/hipe/doc/src/HiPE_app.xml
index 27fbf16fd0..ac6850387f 100644
--- a/lib/hipe/doc/src/HiPE_app.xml
+++ b/lib/hipe/doc/src/HiPE_app.xml
@@ -72,8 +72,7 @@
</item>
<tag>Stack traces</tag>
- <item><p>Stack traces returned from <seemfa marker="erts:erlang#get_stacktrace/0">
- <c>erlang:get_stacktrace/0</c></seemfa> or as part of <c>'EXIT'</c> terms
+ <item><p>Stack traces returned from <c>try</c>/<c>catch</c> or as part of <c>'EXIT'</c> terms
can look incomplete if HiPE compiled functions are involved. Typically a stack trace
will contain only BEAM compiled functions or only HiPE compiled functions, depending
on where the exception was raised.</p>
diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl
index 8c7e27fc5b..143aa31088 100644
--- a/lib/stdlib/src/erl_parse.yrl
+++ b/lib/stdlib/src/erl_parse.yrl
@@ -26,12 +26,8 @@ form
attribute attr_val
function function_clauses function_clause
clause_args clause_guard clause_body
-expr expr_100 expr_150 expr_160 expr_200 expr_300 expr_400 expr_500
-expr_600 expr_650 expr_700 expr_800
-expr_max
-pat_expr pat_expr_200 pat_expr_300 pat_expr_400 pat_expr_500
-pat_expr_600 pat_expr_650 pat_expr_700 pat_expr_800
-pat_expr_max map_pat_expr record_pat_expr
+expr expr_max expr_remote
+pat_expr pat_expr_max map_pat_expr record_pat_expr
pat_argument_list pat_exprs
list tail
list_comprehension lc_expr lc_exprs
@@ -48,11 +44,11 @@ atomic strings
prefix_op mult_op add_op list_op comp_op
binary bin_elements bin_element bit_expr
opt_bit_size_expr bit_size_expr opt_bit_type_list bit_type_list bit_type
-top_type top_type_100 top_types type typed_expr typed_attr_val
-type_sig type_sigs type_guard type_guards fun_type fun_type_100 binary_type
+top_type top_types type typed_expr typed_attr_val
+type_sig type_sigs type_guard type_guards fun_type binary_type
type_spec spec_fun typed_exprs typed_record_fields field_types field_type
map_pair_types map_pair_type
-bin_base_type bin_unit_type type_200 type_300 type_400 type_500.
+bin_base_type bin_unit_type.
Terminals
char integer float atom string var
@@ -74,6 +70,27 @@ Expect 0.
Rootsymbol form.
+%% Expressions
+
+Unary 0 'catch'.
+Right 100 '=' '!'.
+Right 150 'orelse'.
+Right 160 'andalso'.
+Nonassoc 200 comp_op.
+Right 300 list_op.
+Left 400 add_op.
+Left 500 mult_op.
+Unary 600 prefix_op.
+Nonassoc 700 '#'.
+Nonassoc 800 ':'.
+
+%% Types
+
+Right 150 '::'.
+Left 170 '|'.
+Nonassoc 200 '..'.
+Nonassoc 500 '*'. % for binary expressions
+
form -> attribute dot : '$1'.
form -> function dot : '$1'.
@@ -117,25 +134,14 @@ type_guard -> var '::' top_type : build_constraint('$1', '$3').
top_types -> top_type : ['$1'].
top_types -> top_type ',' top_types : ['$1'|'$3'].
-top_type -> var '::' top_type_100 : {ann_type, ?anno('$1'), ['$1','$3']}.
-top_type -> top_type_100 : '$1'.
-
-top_type_100 -> type_200 : '$1'.
-top_type_100 -> type_200 '|' top_type_100 : lift_unions('$1','$3').
-
-type_200 -> type_300 '..' type_300 : {type, ?anno('$1'), range,
- ['$1', '$3']}.
-type_200 -> type_300 : '$1'.
-
-type_300 -> type_300 add_op type_400 : ?mkop2('$1', '$2', '$3').
-type_300 -> type_400 : '$1'.
-
-type_400 -> type_400 mult_op type_500 : ?mkop2('$1', '$2', '$3').
-type_400 -> type_500 : '$1'.
-
-type_500 -> prefix_op type : ?mkop1('$1', '$2').
-type_500 -> type : '$1'.
+top_type -> var '::' top_type : {ann_type, ?anno('$1'), ['$1','$3']}.
+top_type -> type '|' top_type : lift_unions('$1','$3').
+top_type -> type : '$1'.
+type -> type '..' type : {type, ?anno('$1'), range, ['$1', '$3']}.
+type -> type add_op type : ?mkop2('$1', '$2', '$3').
+type -> type mult_op type : ?mkop2('$1', '$2', '$3').
+type -> prefix_op type : ?mkop1('$1', '$2').
type -> '(' top_type ')' : '$2'.
type -> var : '$1'.
type -> atom : '$1'.
@@ -160,13 +166,10 @@ type -> binary_type : '$1'.
type -> integer : '$1'.
type -> char : '$1'.
type -> 'fun' '(' ')' : {type, ?anno('$1'), 'fun', []}.
-type -> 'fun' '(' fun_type_100 ')' : '$3'.
+type -> 'fun' '(' fun_type ')' : '$3'.
-fun_type_100 -> '(' '...' ')' '->' top_type
- : {type, ?anno('$1'), 'fun',
+fun_type -> '(' '...' ')' '->' top_type : {type, ?anno('$1'), 'fun',
[{type, ?anno('$1'), any}, '$5']}.
-fun_type_100 -> fun_type : '$1'.
-
fun_type -> '(' ')' '->' top_type : {type, ?anno('$1'), 'fun',
[{type, ?anno('$1'), product, []}, '$4']}.
fun_type -> '(' top_types ')' '->' top_type
@@ -223,48 +226,22 @@ clause_body -> '->' exprs: '$2'.
expr -> 'catch' expr : {'catch',?anno('$1'),'$2'}.
-expr -> expr_100 : '$1'.
-
-expr_100 -> expr_150 '=' expr_100 : {match,?anno('$2'),'$1','$3'}.
-expr_100 -> expr_150 '!' expr_100 : ?mkop2('$1', '$2', '$3').
-expr_100 -> expr_150 : '$1'.
-
-expr_150 -> expr_160 'orelse' expr_150 : ?mkop2('$1', '$2', '$3').
-expr_150 -> expr_160 : '$1'.
-
-expr_160 -> expr_200 'andalso' expr_160 : ?mkop2('$1', '$2', '$3').
-expr_160 -> expr_200 : '$1'.
-
-expr_200 -> expr_300 comp_op expr_300 :
- ?mkop2('$1', '$2', '$3').
-expr_200 -> expr_300 : '$1'.
-
-expr_300 -> expr_400 list_op expr_300 :
- ?mkop2('$1', '$2', '$3').
-expr_300 -> expr_400 : '$1'.
-
-expr_400 -> expr_400 add_op expr_500 :
- ?mkop2('$1', '$2', '$3').
-expr_400 -> expr_500 : '$1'.
-
-expr_500 -> expr_500 mult_op expr_600 :
- ?mkop2('$1', '$2', '$3').
-expr_500 -> expr_600 : '$1'.
-
-expr_600 -> prefix_op expr_600 :
- ?mkop1('$1', '$2').
-expr_600 -> expr_650 : '$1'.
-
-expr_650 -> map_expr : '$1'.
-expr_650 -> expr_700 : '$1'.
-
-expr_700 -> function_call : '$1'.
-expr_700 -> record_expr : '$1'.
-expr_700 -> expr_800 : '$1'.
-
-expr_800 -> expr_max ':' expr_max :
- {remote,?anno('$2'),'$1','$3'}.
-expr_800 -> expr_max : '$1'.
+expr -> expr '=' expr : {match,?anno('$2'),'$1','$3'}.
+expr -> expr '!' expr : ?mkop2('$1', '$2', '$3').
+expr -> expr 'orelse' expr : ?mkop2('$1', '$2', '$3').
+expr -> expr 'andalso' expr : ?mkop2('$1', '$2', '$3').
+expr -> expr comp_op expr : ?mkop2('$1', '$2', '$3').
+expr -> expr list_op expr : ?mkop2('$1', '$2', '$3').
+expr -> expr add_op expr : ?mkop2('$1', '$2', '$3').
+expr -> expr mult_op expr : ?mkop2('$1', '$2', '$3').
+expr -> prefix_op expr : ?mkop1('$1', '$2').
+expr -> map_expr : '$1'.
+expr -> function_call : '$1'.
+expr -> record_expr : '$1'.
+expr -> expr_remote : '$1'.
+
+expr_remote -> expr_max ':' expr_max : {remote,?anno('$2'),'$1','$3'}.
+expr_remote -> expr_max : '$1'.
expr_max -> var : '$1'.
expr_max -> atomic : '$1'.
@@ -281,36 +258,15 @@ expr_max -> receive_expr : '$1'.
expr_max -> fun_expr : '$1'.
expr_max -> try_expr : '$1'.
-pat_expr -> pat_expr_200 '=' pat_expr : {match,?anno('$2'),'$1','$3'}.
-pat_expr -> pat_expr_200 : '$1'.
-
-pat_expr_200 -> pat_expr_300 comp_op pat_expr_300 :
- ?mkop2('$1', '$2', '$3').
-pat_expr_200 -> pat_expr_300 : '$1'.
-
-pat_expr_300 -> pat_expr_400 list_op pat_expr_300 :
- ?mkop2('$1', '$2', '$3').
-pat_expr_300 -> pat_expr_400 : '$1'.
-
-pat_expr_400 -> pat_expr_400 add_op pat_expr_500 :
- ?mkop2('$1', '$2', '$3').
-pat_expr_400 -> pat_expr_500 : '$1'.
-
-pat_expr_500 -> pat_expr_500 mult_op pat_expr_600 :
- ?mkop2('$1', '$2', '$3').
-pat_expr_500 -> pat_expr_600 : '$1'.
-
-pat_expr_600 -> prefix_op pat_expr_600 :
- ?mkop1('$1', '$2').
-pat_expr_600 -> pat_expr_650 : '$1'.
-
-pat_expr_650 -> map_pat_expr : '$1'.
-pat_expr_650 -> pat_expr_700 : '$1'.
-
-pat_expr_700 -> record_pat_expr : '$1'.
-pat_expr_700 -> pat_expr_800 : '$1'.
-
-pat_expr_800 -> pat_expr_max : '$1'.
+pat_expr -> pat_expr '=' pat_expr : {match,?anno('$2'),'$1','$3'}.
+pat_expr -> pat_expr comp_op pat_expr : ?mkop2('$1', '$2', '$3').
+pat_expr -> pat_expr list_op pat_expr : ?mkop2('$1', '$2', '$3').
+pat_expr -> pat_expr add_op pat_expr : ?mkop2('$1', '$2', '$3').
+pat_expr -> pat_expr mult_op pat_expr : ?mkop2('$1', '$2', '$3').
+pat_expr -> prefix_op pat_expr : ?mkop1('$1', '$2').
+pat_expr -> map_pat_expr : '$1'.
+pat_expr -> record_pat_expr : '$1'.
+pat_expr -> pat_expr_max : '$1'.
pat_expr_max -> var : '$1'.
pat_expr_max -> atomic : '$1'.
@@ -405,7 +361,7 @@ map_field_exact -> map_key ':=' expr :
map_key -> expr : '$1'.
-%% N.B. This is called from expr_700.
+%% N.B. This is called from expr.
%% N.B. Field names are returned as the complete object, even if they are
%% always atoms for the moment, this might change in the future.
@@ -431,9 +387,9 @@ record_fields -> record_field ',' record_fields : ['$1' | '$3'].
record_field -> var '=' expr : {record_field,?anno('$1'),'$1','$3'}.
record_field -> atom '=' expr : {record_field,?anno('$1'),'$1','$3'}.
-%% N.B. This is called from expr_700.
+%% N.B. This is called from expr.
-function_call -> expr_800 argument_list :
+function_call -> expr_remote argument_list :
{call,?anno('$1'),'$1',element(1, '$2')}.
diff --git a/lib/stdlib/src/otp_internal.erl b/lib/stdlib/src/otp_internal.erl
index b6531d9b5c..aebef5a18a 100644
--- a/lib/stdlib/src/otp_internal.erl
+++ b/lib/stdlib/src/otp_internal.erl
@@ -65,8 +65,6 @@ obsolete(crypto, stream_decrypt, 2) ->
{deprecated, "use crypto:crypto_update/2 instead", "OTP 24"};
obsolete(crypto, stream_encrypt, 2) ->
{deprecated, "use crypto:crypto_update/2 instead", "OTP 24"};
-obsolete(erlang, get_stacktrace, 0) ->
- {deprecated, "use the new try/catch syntax for retrieving the stack backtrace", "OTP 24"};
obsolete(erlang, now, 0) ->
{deprecated, "see the \"Time and Time Correction in Erlang\" chapter of the ERTS User's Guide for more information"};
obsolete(filename, safe_relative_path, 1) ->
@@ -439,6 +437,8 @@ obsolete(erl_parse, set_line, 2) ->
{removed, "use erl_anno:set_line/2"};
obsolete(erl_scan, set_attribute, 3) ->
{removed, "use erl_anno:set_line/2 instead"};
+obsolete(erlang, get_stacktrace, 0) ->
+ {removed, "use the new try/catch syntax for retrieving the stack backtrace"};
obsolete(erlang, hash, 2) ->
{removed, "use erlang:phash2/2 instead"};
obsolete(httpd_conf, check_enum, 2) ->
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el
index 3c765c010b..1676a62a2b 100644
--- a/lib/tools/emacs/erlang.el
+++ b/lib/tools/emacs/erlang.el
@@ -952,7 +952,6 @@ resulting regexp is surrounded by \\_< and \\_>."
"gather_gc_info_result"
"get_cookie"
"get_module_info"
- "get_stacktrace"
"has_prepared_code_on_load"
"hibernate"
"insert_element"
diff --git a/make/otp_version_tickets_in_merge b/make/otp_version_tickets_in_merge
index 1c9a3e3bb9..e69de29bb2 100644
--- a/make/otp_version_tickets_in_merge
+++ b/make/otp_version_tickets_in_merge
@@ -1,6 +0,0 @@
-OTP-16582
-OTP-16607
-OTP-16639
-OTP-16652
-OTP-16654
-OTP-16657
diff --git a/system/doc/general_info/DEPRECATIONS b/system/doc/general_info/DEPRECATIONS
index 9983df9421..53c5aaf750 100644
--- a/system/doc/general_info/DEPRECATIONS
+++ b/system/doc/general_info/DEPRECATIONS
@@ -108,7 +108,6 @@ ssl:ssl_accept/_ since=21 remove=24
#
crypto:rand_uniform/2 since=20
-erlang:get_stacktrace/0 since=20 remove=24
filename:find_src/_ since=20 remove=24
gen_fsm:_/_ since=20