From 4df513725e90af55f709126a5d35674142a05791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Sun, 31 Jan 2010 15:44:48 +0100 Subject: erl_bif_types: add 'http_bin' as a valid packet option {packet,http_bin} is now a valid packet option for the gen_tcp and inet modules. --- lib/hipe/cerl/erl_bif_types.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/hipe/cerl/erl_bif_types.erl') diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl index 756fcb8bbf..5160273afe 100644 --- a/lib/hipe/cerl/erl_bif_types.erl +++ b/lib/hipe/cerl/erl_bif_types.erl @@ -4906,7 +4906,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 -- cgit v1.2.3 From 11d4aabd55fbf07701840827040f4b5496221587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 3 Feb 2010 10:08:37 +0100 Subject: Add types for erts_debug:dist_ext_to_term/2 --- lib/hipe/cerl/erl_bif_types.erl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/hipe/cerl/erl_bif_types.erl') diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl index 5160273afe..862166cb1b 100644 --- a/lib/hipe/cerl/erl_bif_types.erl +++ b/lib/hipe/cerl/erl_bif_types.erl @@ -1768,6 +1768,9 @@ 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, same, 2, Xs) -> @@ -3865,6 +3868,8 @@ 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, same, 2) -> -- cgit v1.2.3 From 3f2a3a5e0b451ec82f33ece82132921cf8492094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Sat, 13 Feb 2010 07:42:37 +0100 Subject: Add types for os:timestamp/0 --- lib/hipe/cerl/erl_bif_types.erl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/hipe/cerl/erl_bif_types.erl') diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl index 862166cb1b..7cd3fc7157 100644 --- a/lib/hipe/cerl/erl_bif_types.erl +++ b/lib/hipe/cerl/erl_bif_types.erl @@ -2672,6 +2672,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, @@ -4294,6 +4296,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()]; -- cgit v1.2.3 From 6d2d8b9c2bbd6a1c582cb936e69b4bfe491c85be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Sat, 13 Feb 2010 08:24:26 +0100 Subject: Add types for erts_debug:lock_counters/1 erts_debug:lock_counters/1 is an undocumented BIF used by the 'lcnt' module in the 'tools' application. --- lib/hipe/cerl/erl_bif_types.erl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'lib/hipe/cerl/erl_bif_types.erl') diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl index 7cd3fc7157..3d408c9df7 100644 --- a/lib/hipe/cerl/erl_bif_types.erl +++ b/lib/hipe/cerl/erl_bif_types.erl @@ -1773,6 +1773,24 @@ type(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 ---------------------------------------------------------------------- @@ -3874,6 +3892,12 @@ 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 ----------------------------------------------------------------- -- cgit v1.2.3