aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-12-16 19:11:48 +0100
committerSverker Eriksson <[email protected]>2016-01-13 19:59:53 +0100
commitdc54c2a27c41930a18e0c7f2b97eda6cd4a0b1c1 (patch)
tree5018e4ed47be3202d6969ec125a2861b6454ef3e /erts
parentfa44f865c3fc6253cf4691cf94839c303a3ee40f (diff)
downloadotp-dc54c2a27c41930a18e0c7f2b97eda6cd4a0b1c1.tar.gz
otp-dc54c2a27c41930a18e0c7f2b97eda6cd4a0b1c1.tar.bz2
otp-dc54c2a27c41930a18e0c7f2b97eda6cd4a0b1c1.zip
erts: Move copy_literals/2 from erlang to erts_internal
as it's not a public interface.
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/beam_bif_load.c5
-rw-r--r--erts/emulator/beam/bif.tab2
-rw-r--r--erts/preloaded/ebin/erlang.beambin102556 -> 102332 bytes
-rw-r--r--erts/preloaded/ebin/erts_code_purger.beambin8992 -> 8996 bytes
-rw-r--r--erts/preloaded/ebin/erts_internal.beambin6432 -> 6632 bytes
-rw-r--r--erts/preloaded/src/erlang.erl9
-rw-r--r--erts/preloaded/src/erts_code_purger.erl10
-rw-r--r--erts/preloaded/src/erts_internal.erl7
8 files changed, 17 insertions, 16 deletions
diff --git a/erts/emulator/beam/beam_bif_load.c b/erts/emulator/beam/beam_bif_load.c
index 014ee35fd0..39a5bff04c 100644
--- a/erts/emulator/beam/beam_bif_load.c
+++ b/erts/emulator/beam/beam_bif_load.c
@@ -1031,7 +1031,7 @@ copy_literals_t erts_clrange = {NULL, 0};
*/
-BIF_RETTYPE copy_literals_2(BIF_ALIST_2)
+BIF_RETTYPE erts_internal_copy_literals_2(BIF_ALIST_2)
{
Module* modp;
ErtsCodeIndex code_ix;
@@ -1042,7 +1042,8 @@ BIF_RETTYPE copy_literals_2(BIF_ALIST_2)
}
if (!erts_try_seize_code_write_permission(BIF_P)) {
- ERTS_BIF_YIELD2(bif_export[BIF_copy_literals_2], BIF_P, BIF_ARG_1, BIF_ARG_2);
+ ERTS_BIF_YIELD2(bif_export[BIF_erts_internal_copy_literals_2],
+ BIF_P, BIF_ARG_1, BIF_ARG_2);
}
code_ix = erts_active_code_ix();
diff --git a/erts/emulator/beam/bif.tab b/erts/emulator/beam/bif.tab
index 3b95ec508c..1b8ae8cef5 100644
--- a/erts/emulator/beam/bif.tab
+++ b/erts/emulator/beam/bif.tab
@@ -641,7 +641,7 @@ bif erts_debug:map_info/1
# New in 19.0
#
-bif erlang:copy_literals/2
+bif erts_internal:copy_literals/2
bif erts_internal:purge_module/1
bif binary:split/2
bif binary:split/3
diff --git a/erts/preloaded/ebin/erlang.beam b/erts/preloaded/ebin/erlang.beam
index 4353e115ca..d58d9c909e 100644
--- a/erts/preloaded/ebin/erlang.beam
+++ b/erts/preloaded/ebin/erlang.beam
Binary files differ
diff --git a/erts/preloaded/ebin/erts_code_purger.beam b/erts/preloaded/ebin/erts_code_purger.beam
index 553b34b105..74001fc799 100644
--- a/erts/preloaded/ebin/erts_code_purger.beam
+++ b/erts/preloaded/ebin/erts_code_purger.beam
Binary files differ
diff --git a/erts/preloaded/ebin/erts_internal.beam b/erts/preloaded/ebin/erts_internal.beam
index 150e76505d..7577522151 100644
--- a/erts/preloaded/ebin/erts_internal.beam
+++ b/erts/preloaded/ebin/erts_internal.beam
Binary files differ
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl
index ab54d716cc..0a41951900 100644
--- a/erts/preloaded/src/erlang.erl
+++ b/erts/preloaded/src/erlang.erl
@@ -91,7 +91,7 @@
-export([bit_size/1, bitsize/1, bitstring_to_list/1]).
-export([bump_reductions/1, byte_size/1, call_on_load_function/1]).
-export([cancel_timer/1, cancel_timer/2, check_old_code/1, check_process_code/2,
- check_process_code/3, copy_literals/2, crc32/1]).
+ check_process_code/3, crc32/1]).
-export([crc32/2, crc32_combine/3, date/0, decode_packet/3]).
-export([delete_element/2]).
-export([delete_module/1, demonitor/1, demonitor/2, display/1]).
@@ -520,13 +520,6 @@ get_cpc_opts([{allow_gc, AllowGC} | Options], Async, _OldAllowGC) ->
get_cpc_opts([], Async, AllowGC) ->
{Async, AllowGC}.
-%% copy_literals/2
--spec erlang:copy_literals(Module,Bool) -> 'true' | 'false' | 'aborted' when
- Module :: module(),
- Bool :: boolean().
-copy_literals(_Mod, _Bool) ->
- erlang:nif_error(undefined).
-
%% crc32/1
-spec erlang:crc32(Data) -> non_neg_integer() when
Data :: iodata().
diff --git a/erts/preloaded/src/erts_code_purger.erl b/erts/preloaded/src/erts_code_purger.erl
index 880c86aad1..c7fe3ce22f 100644
--- a/erts/preloaded/src/erts_code_purger.erl
+++ b/erts/preloaded/src/erts_code_purger.erl
@@ -67,9 +67,9 @@ do_purge(Mod) ->
false ->
{false, false};
true ->
- true = erlang:copy_literals(Mod, true),
+ true = erts_internal:copy_literals(Mod, true),
DidKill = check_proc_code(erlang:processes(), Mod, true),
- true = erlang:copy_literals(Mod, false),
+ true = erts_internal:copy_literals(Mod, false),
WasPurged = erts_internal:purge_module(Mod),
{WasPurged, DidKill}
end.
@@ -93,13 +93,13 @@ do_soft_purge(Mod) ->
false ->
true;
true ->
- true = erlang:copy_literals(Mod, true),
+ true = erts_internal:copy_literals(Mod, true),
case check_proc_code(erlang:processes(), Mod, false) of
false ->
- true = erlang:copy_literals(Mod, false),
+ true = erts_internal:copy_literals(Mod, false),
false;
true ->
- true = erlang:copy_literals(Mod, false),
+ true = erts_internal:copy_literals(Mod, false),
erts_internal:purge_module(Mod),
true
end
diff --git a/erts/preloaded/src/erts_internal.erl b/erts/preloaded/src/erts_internal.erl
index 6e649e8395..30e9ba304c 100644
--- a/erts/preloaded/src/erts_internal.erl
+++ b/erts/preloaded/src/erts_internal.erl
@@ -38,6 +38,7 @@
-export([request_system_task/3]).
-export([check_process_code/2]).
+-export([copy_literals/2]).
-export([purge_module/1]).
-export([flush_monitor_messages/3]).
@@ -205,6 +206,12 @@ request_system_task(_Pid, _Prio, _Request) ->
check_process_code(_Module, _OptionList) ->
erlang:nif_error(undefined).
+-spec copy_literals(Module,Bool) -> 'true' | 'false' | 'aborted' when
+ Module :: module(),
+ Bool :: boolean().
+copy_literals(_Mod, _Bool) ->
+ erlang:nif_error(undefined).
+
-spec purge_module(Module) -> boolean() when
Module :: module().
purge_module(_Module) ->