aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/cerl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-08-10 14:39:34 +0200
committerBjörn Gustavsson <[email protected]>2011-08-25 09:54:31 +0200
commit631939c2452413014dfe3777997157ab541770ae (patch)
tree06452bae61ac570205734b06a6f18e72f66c4c24 /lib/hipe/cerl
parent1c40ae26dfb9b5578e7d307f901d4178d6244849 (diff)
downloadotp-631939c2452413014dfe3777997157ab541770ae.tar.gz
otp-631939c2452413014dfe3777997157ab541770ae.tar.bz2
otp-631939c2452413014dfe3777997157ab541770ae.zip
Add erlang:check_old_code/1
Add erlang:check_old_code/1 to quickly check whether a module has old code. If there is no old code, there is no need to call erlang:check_process_code/2 for all processes, which will save some time if there are many processes.
Diffstat (limited to 'lib/hipe/cerl')
-rw-r--r--lib/hipe/cerl/erl_bif_types.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl
index f1be658054..82e3675938 100644
--- a/lib/hipe/cerl/erl_bif_types.erl
+++ b/lib/hipe/cerl/erl_bif_types.erl
@@ -672,6 +672,9 @@ type(erlang, call_on_load_function, 1, Xs) ->
type(erlang, cancel_timer, 1, Xs) ->
strict(arg_types(erlang, cancel_timer, 1), Xs,
fun (_) -> t_sup(t_integer(), t_atom('false')) end);
+type(erlang, check_old_code, 1, Xs) ->
+ strict(arg_types(erlang, check_old_code, 1), Xs,
+ fun (_) -> t_boolean() end);
type(erlang, check_process_code, 2, Xs) ->
strict(arg_types(erlang, check_process_code, 2), Xs,
fun (_) -> t_boolean() end);
@@ -3395,6 +3398,8 @@ arg_types(erlang, call_on_load_function, 1) ->
[t_atom()];
arg_types(erlang, cancel_timer, 1) ->
[t_reference()];
+arg_types(erlang, check_old_code, 1) ->
+ [t_atom()];
arg_types(erlang, check_process_code, 2) ->
[t_pid(), t_atom()];
arg_types(erlang, concat_binary, 1) ->