aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-09-21 10:22:04 +0200
committerBjörn Gustavsson <[email protected]>2015-09-21 10:22:04 +0200
commita329b16a074e5aaaa0b640b2ad83e533a5cc0fdc (patch)
tree149d0ca745258db70c55f3787c06afc296a19ff5 /lib/compiler/src
parentcc4d2fda78255b183014490fa108e30ff7d65e71 (diff)
parent52595d8da8bc43da6848075f869111e0de1dceb1 (diff)
downloadotp-a329b16a074e5aaaa0b640b2ad83e533a5cc0fdc.tar.gz
otp-a329b16a074e5aaaa0b640b2ad83e533a5cc0fdc.tar.bz2
otp-a329b16a074e5aaaa0b640b2ad83e533a5cc0fdc.zip
Merge branch 'bjorn/compiler/remove-deprecated/OTP-12979'
* bjorn/compiler/remove-deprecated/OTP-12979: core_lib: Remove previously deprecated functions
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/core_lib.erl38
1 files changed, 1 insertions, 37 deletions
diff --git a/lib/compiler/src/core_lib.erl b/lib/compiler/src/core_lib.erl
index 3abb520485..839c736ff2 100644
--- a/lib/compiler/src/core_lib.erl
+++ b/lib/compiler/src/core_lib.erl
@@ -21,52 +21,16 @@
-module(core_lib).
--deprecated({get_anno,1,next_major_release}).
--deprecated({set_anno,2,next_major_release}).
--deprecated({is_literal,1,next_major_release}).
--deprecated({is_literal_list,1,next_major_release}).
--deprecated({literal_value,1,next_major_release}).
-
--export([get_anno/1,set_anno/2]).
--export([is_literal/1,is_literal_list/1]).
--export([literal_value/1]).
-export([make_values/1]).
-export([is_var_used/2]).
-include("core_parse.hrl").
-%%
-%% Generic get/set annotation that should be used only with cerl() structures.
-%%
--spec get_anno(cerl:cerl()) -> term().
-
-get_anno(C) -> cerl:get_ann(C).
-
--spec set_anno(cerl:cerl(), term()) -> cerl:cerl().
-
-set_anno(C, A) -> cerl:set_ann(C, A).
-
--spec is_literal(cerl:cerl()) -> boolean().
-
-is_literal(Cerl) ->
- cerl:is_literal(cerl:fold_literal(Cerl)).
-
--spec is_literal_list([cerl:cerl()]) -> boolean().
-
-is_literal_list(Es) -> lists:all(fun is_literal/1, Es).
-
-%% Return the value of LitExpr.
--spec literal_value(cerl:c_literal() | cerl:c_binary() |
- cerl:c_map() | cerl:c_cons() | cerl:c_tuple()) -> term().
-
-literal_value(Cerl) ->
- cerl:concrete(cerl:fold_literal(Cerl)).
-
%% Make a suitable values structure, expr or values, depending on Expr.
-spec make_values([cerl:cerl()] | cerl:cerl()) -> cerl:cerl().
make_values([E]) -> E;
-make_values([H|_]=Es) -> #c_values{anno=get_anno(H),es=Es};
+make_values([H|_]=Es) -> #c_values{anno=cerl:get_ann(H),es=Es};
make_values([]) -> #c_values{es=[]};
make_values(E) -> E.