diff options
author | Erlang/OTP <[email protected]> | 2010-02-16 07:54:28 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-02-16 07:54:28 +0000 |
commit | 06113bad97bc0606841f067975d2efb001e8b240 (patch) | |
tree | df4aef09f60ab97c1993c4625d0de62a9796f090 /lib | |
parent | 333d2b2bf79db0dd7d42ec69b13aa9d820d57c10 (diff) | |
parent | 6d2d8b9c2bbd6a1c582cb936e69b4bfe491c85be (diff) | |
download | otp-06113bad97bc0606841f067975d2efb001e8b240.tar.gz otp-06113bad97bc0606841f067975d2efb001e8b240.tar.bz2 otp-06113bad97bc0606841f067975d2efb001e8b240.zip |
Merge branch 'bg/erl_bif_types' into ccase/r13b04_dev
* bg/erl_bif_types:
Add types for erts_debug:lock_counters/1
Add types for os:timestamp/0
Add types for erts_debug:dist_ext_to_term/2
erl_bif_types: add 'http_bin' as a valid packet option
OTP-8437: bg/erl_bif_types
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hipe/cerl/erl_bif_types.erl | 46 |
1 files changed, 40 insertions, 6 deletions
diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl index 756fcb8bbf..21e41ef45e 100644 --- a/lib/hipe/cerl/erl_bif_types.erl +++ b/lib/hipe/cerl/erl_bif_types.erl @@ -1,20 +1,20 @@ %% -*- erlang-indent-level: 2 -*- %% %% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2003-2009. All Rights Reserved. -%% +%% +%% Copyright Ericsson AB 2003-2010. All Rights Reserved. +%% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved online at http://www.erlang.org/. -%% +%% %% Software distributed under the License is distributed on an "AS IS" %% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See %% the License for the specific language governing rights and limitations %% under the License. -%% +%% %% %CopyrightEnd% %% %% ===================================================================== @@ -1768,8 +1768,29 @@ type(erts_debug, disassemble, 1, Xs) -> fun (_) -> t_sup([t_atom('false'), t_atom('undef'), t_tuple([t_integer(), t_binary(), t_mfa()])]) end); +type(erts_debug, dist_ext_to_term, 2, Xs) -> + strict(arg_types(erts_debug, dist_ext_to_term, 2), Xs, + fun (_) -> t_any() end); type(erts_debug, flat_size, 1, Xs) -> strict(arg_types(erts_debug, flat_size, 1), Xs, fun (_) -> t_integer() end); +type(erts_debug, lock_counters, 1, Xs) -> + strict(arg_types(erts_debug, lock_counters, 1), Xs, + fun ([Arg]) -> + case t_is_atom(Arg) of + true -> + case t_atom_vals(Arg) of + ['enabled'] -> t_boolean(); + ['info'] -> t_any(); + ['clear'] -> t_atom(ok); + _ -> t_sup([t_boolean(), t_any(), t_atom('ok')]) + end; + false -> + case t_is_tuple(Arg) of + true -> t_boolean(); + false -> t_sup([t_boolean(), t_any(), t_atom('ok')]) + end + end + end); type(erts_debug, same, 2, Xs) -> strict(arg_types(erts_debug, same, 2), Xs, fun (_) -> t_boolean() end); %%-- ets ---------------------------------------------------------------------- @@ -2669,6 +2690,8 @@ type(os, getenv, 1, Xs) -> type(os, getpid, 0, _) -> t_string(); type(os, putenv, 2, Xs) -> strict(arg_types(os, putenv, 2), Xs, fun (_) -> t_atom('true') end); +type(os, timestamp, 0, _) -> + t_time(); %%-- re ----------------------------------------------------------------------- type(re, compile, 1, Xs) -> strict(arg_types(re, compile, 1), Xs, @@ -3865,8 +3888,16 @@ arg_types(erts_debug, breakpoint, 2) -> [t_tuple([t_atom(), t_atom(), t_sup(t_integer(), t_atom('_'))]), t_boolean()]; arg_types(erts_debug, disassemble, 1) -> [t_sup(t_mfa(), t_integer())]; +arg_types(erts_debug, dist_ext_to_term, 2) -> + [t_tuple(), t_binary()]; arg_types(erts_debug, flat_size, 1) -> [t_any()]; +arg_types(erts_debug, lock_counters, 1) -> + [t_sup([t_atom(enabled), + t_atom(info), + t_atom(clear), + t_tuple([t_atom(copy_save), t_boolean()]), + t_tuple([t_atom(process_locks), t_boolean()])])]; arg_types(erts_debug, same, 2) -> [t_any(), t_any()]; %%------- ets ----------------------------------------------------------------- @@ -4289,6 +4320,8 @@ arg_types(os, getpid, 0) -> []; arg_types(os, putenv, 2) -> [t_string(), t_string()]; +arg_types(os, timestamp, 0) -> + []; %%-- re ----------------------------------------------------------------------- arg_types(re, compile, 1) -> [t_iodata()]; @@ -4906,7 +4939,8 @@ t_inet_setoption_packettype() -> t_integers([0,1,2,4]), t_atom('asn1'), t_atom('cdr'), t_atom('sunrm'), t_atom('fcgi'), t_atom('tpkt'), t_atom('line'), - t_atom('http')]). %% but t_atom('httph') is not needed + t_atom('http'), + t_atom('http_bin')]). %% but t_atom('httph') is not needed t_inet_posix_error() -> t_atom(). %% XXX: Very underspecified |