diff options
25 files changed, 83 insertions, 249 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 Binary files differindex 547f105df8..c712df50d0 100644 --- a/bootstrap/lib/stdlib/ebin/otp_internal.beam +++ b/bootstrap/lib/stdlib/ebin/otp_internal.beam diff --git a/erts/doc/src/absform.xml b/erts/doc/src/absform.xml index d3ba0932b7..65538a80f6 100644 --- a/erts/doc/src/absform.xml +++ b/erts/doc/src/absform.xml @@ -370,9 +370,7 @@ </item> <item> <p>If E is a fun expression <c>fun Module:Name/Arity</c>, then Rep(E) = - <c>{'fun',LINE,{function,Rep(Module),Rep(Name),Rep(Arity)}}</c>. - (Before Erlang/OTP R15: Rep(E) = - <c>{'fun',LINE,{function,Module,Name,Arity}}</c>.)</p> + <c>{'fun',LINE,{function,Rep(Module),Rep(Name),Rep(Arity)}}</c>.</p> </item> <item> <p>If E is a fun expression <c>fun Fc_1 ; ... ; Fc_k end</c>, 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 Binary files differindex 61e841b703..9bf538de29 100644 --- a/erts/preloaded/ebin/erlang.beam +++ b/erts/preloaded/ebin/erlang.beam 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/inets/src/http_lib/http_request.erl b/lib/inets/src/http_lib/http_request.erl index c49402cc1f..2510cdede2 100644 --- a/lib/inets/src/http_lib/http_request.erl +++ b/lib/inets/src/http_lib/http_request.erl @@ -103,9 +103,11 @@ is_absolut_uri(_) -> %% Description: returns a normalized Host header value, with the port %% number omitted for well-known ports %%------------------------------------------------------------------------- -normalize_host(https, Host, 443 = _Port) -> +normalize_host(https, Host, Port) when Port =:= 443 orelse + Port =:= undefined -> Host; -normalize_host(http, Host, 80 = _Port) -> +normalize_host(http, Host, Port) when Port =:= 80 orelse + Port =:= undefined -> Host; normalize_host(_Scheme, Host, Port) -> Host ++ ":" ++ integer_to_list(Port). diff --git a/lib/stdlib/examples/erl_id_trans.erl b/lib/stdlib/examples/erl_id_trans.erl index a707c45eb9..f18e13a565 100644 --- a/lib/stdlib/examples/erl_id_trans.erl +++ b/lib/stdlib/examples/erl_id_trans.erl @@ -480,11 +480,7 @@ expr({'fun',Line,Body}) -> {'fun',Line,{clauses,Cs1}}; {function,F,A} -> {'fun',Line,{function,F,A}}; - {function,M,F,A} when is_atom(M), is_atom(F), is_integer(A) -> - %% R10B-6: fun M:F/A. (Backward compatibility) - {'fun',Line,{function,M,F,A}}; {function,M0,F0,A0} -> - %% R15: fun M:F/A with variables. M = expr(M0), F = expr(F0), A = expr(A0), diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl index 7c717e47d1..442ea01da0 100644 --- a/lib/stdlib/src/erl_lint.erl +++ b/lib/stdlib/src/erl_lint.erl @@ -2426,11 +2426,7 @@ expr({'fun',Line,Body}, Vt, St) -> true -> {[],St}; false -> {[],call_function(Line, F, A, St)} end; - {function,M,F,A} when is_atom(M), is_atom(F), is_integer(A) -> - %% Compatibility with pre-R15 abstract format. - {[],St}; {function,M,F,A} -> - %% New in R15. expr_list([M,F,A], Vt, St) end; expr({named_fun,_,'_',Cs}, Vt, St) -> 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/erl_pp.erl b/lib/stdlib/src/erl_pp.erl index 651c601bb0..2ccd6c53b5 100644 --- a/lib/stdlib/src/erl_pp.erl +++ b/lib/stdlib/src/erl_pp.erl @@ -623,15 +623,7 @@ lexpr({'fun',_,{function,F,A}}, _Prec, _Opts) -> [leaf("fun "),{atom,F},leaf(format("/~w", [A]))]; lexpr({'fun',L,{function,_,_}=Func,Extra}, Prec, Opts) -> {force_nl,fun_info(Extra),lexpr({'fun',L,Func}, Prec, Opts)}; -lexpr({'fun',L,{function,M,F,A}}, Prec, Opts) - when is_atom(M), is_atom(F), is_integer(A) -> - %% For backward compatibility with pre-R15 abstract format. - Mod = erl_parse:abstract(M), - Fun = erl_parse:abstract(F), - Arity = erl_parse:abstract(A), - lexpr({'fun',L,{function,Mod,Fun,Arity}}, Prec, Opts); lexpr({'fun',_,{function,M,F,A}}, _Prec, Opts) -> - %% New format in R15. NameItem = lexpr(M, Opts), CallItem = lexpr(F, Opts), ArityItem = lexpr(A, Opts), 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/syntax_tools/src/erl_syntax.erl b/lib/syntax_tools/src/erl_syntax.erl index ed94bd383c..087ce72ded 100644 --- a/lib/syntax_tools/src/erl_syntax.erl +++ b/lib/syntax_tools/src/erl_syntax.erl @@ -6872,15 +6872,7 @@ implicit_fun_name(Node) -> {'fun', Pos, {function, Atom, Arity}} -> arity_qualifier(set_pos(atom(Atom), Pos), set_pos(integer(Arity), Pos)); - {'fun', Pos, {function, Module, Atom, Arity}} - when is_atom(Module), is_atom(Atom), is_integer(Arity) -> - %% Backward compatibility with pre-R15 abstract format. - module_qualifier(set_pos(atom(Module), Pos), - arity_qualifier( - set_pos(atom(Atom), Pos), - set_pos(integer(Arity), Pos))); {'fun', _Pos, {function, Module, Atom, Arity}} -> - %% New in R15: fun M:F/A. %% XXX: Perhaps set position for this as well? module_qualifier(Module, arity_qualifier(Atom, Arity)); Node1 -> 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/lib/tools/src/xref_reader.erl b/lib/tools/src/xref_reader.erl index d28bdb78db..c145b98972 100644 --- a/lib/tools/src/xref_reader.erl +++ b/lib/tools/src/xref_reader.erl @@ -171,15 +171,6 @@ expr({'try',_Line,Es,Scs,Ccs,As}, S) -> S2 = clauses(Scs, S1), S3 = clauses(Ccs, S2), expr(As, S3); -expr({'fun', Line, {function,M,F,A}}, S) - when is_atom(M), is_atom(F), is_integer(A) -> - %% This is the old format for external funs, generated by a pre-R15 - %% compiler. Exposed in OTP 20 because sys_pre_expand is no longer - %% run. - Fun = {'fun', Line, {function, {atom,Line,M}, - {atom,Line,F}, - {integer,Line,A}}}, - expr(Fun, S); expr({'fun', Line, {function, {atom,_,Mod}, {atom,_,Name}, {integer,_,Arity}}}, S) -> diff --git a/lib/tools/test/xref_SUITE.erl b/lib/tools/test/xref_SUITE.erl index d258966bc2..4ed8130dc0 100644 --- a/lib/tools/test/xref_SUITE.erl +++ b/lib/tools/test/xref_SUITE.erl @@ -45,7 +45,7 @@ -export([add/1, default/1, info/1, lib/1, read/1, read2/1, remove/1, replace/1, update/1, deprecated/1, trycatch/1, - fun_mfa/1, fun_mfa_r14/1, + fun_mfa/1, fun_mfa_vars/1, qlc/1]). -export([analyze/1, basic/1, md/1, q/1, variables/1, unused_locals/1]). @@ -80,7 +80,7 @@ groups() -> {files, [], [add, default, info, lib, read, read2, remove, replace, update, deprecated, trycatch, fun_mfa, - fun_mfa_r14, fun_mfa_vars, qlc]}, + fun_mfa_vars, qlc]}, {analyses, [], [analyze, basic, md, q, variables, unused_locals]}, @@ -1676,28 +1676,6 @@ fun_mfa(Conf) when is_list(Conf) -> ok = file:delete(Beam), ok. -%% Same as the previous test case, except that we use a BEAM file -%% that was compiled by an R14 compiler to test backward compatibility. -fun_mfa_r14(Conf) when is_list(Conf) -> - Dir = proplists:get_value(data_dir, Conf), - MFile = fname(Dir, "fun_mfa_r14"), - - A = fun_mfa_r14, - {ok, _} = xref:start(s), - {ok, A} = xref:add_module(s, MFile, {warnings,false}), - {ok, [{{{A,t,0},{'$M_EXPR','$F_EXPR',0}},[7]}, - {{{A,t,0},{A,t,0}},[6]}, - {{{A,t1,0},{'$M_EXPR','$F_EXPR',0}},[11]}, - {{{A,t1,0},{A,t,0}},[10]}, - {{{A,t2,0},{A,t,0}},[14]}, - {{{A,t3,0},{A,t3,0}},[17]}]} = - xref:q(s, "(Lin) E"), - - ok = check_state(s), - xref:stop(s), - - ok. - %% fun M:F/A with varibles. fun_mfa_vars(Conf) when is_list(Conf) -> Dir = ?copydir, diff --git a/lib/tools/test/xref_SUITE_data/fun_mfa_r14.beam b/lib/tools/test/xref_SUITE_data/fun_mfa_r14.beam Binary files differdeleted file mode 100644 index 4645525690..0000000000 --- a/lib/tools/test/xref_SUITE_data/fun_mfa_r14.beam +++ /dev/null diff --git a/lib/tools/test/xref_SUITE_data/fun_mfa_r14.erl b/lib/tools/test/xref_SUITE_data/fun_mfa_r14.erl deleted file mode 100644 index 293bd83a8b..0000000000 --- a/lib/tools/test/xref_SUITE_data/fun_mfa_r14.erl +++ /dev/null @@ -1,18 +0,0 @@ --module(fun_mfa_r14). - --export([t/0, t1/0, t2/0, t3/0]). - -t() -> - F = fun ?MODULE:t/0, - (F)(). - -t1() -> - F = fun t/0, - (F)(). - -t2() -> - fun ?MODULE:t/0(). - -t3() -> - fun t3/0(). - 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 |