aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/cerl/erl_bif_types.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-06-01 08:14:55 +0200
committerRaimo Niskanen <[email protected]>2010-06-07 17:41:16 +0200
commitf54f5e00aaa3858e506c3d97daaee4ddddc8bf30 (patch)
tree246e4a211703c74e6473b5792362176e53bb57b0 /lib/hipe/cerl/erl_bif_types.erl
parent518bde000ae62811fc969ce29cf038c70a4415c8 (diff)
downloadotp-f54f5e00aaa3858e506c3d97daaee4ddddc8bf30.tar.gz
otp-f54f5e00aaa3858e506c3d97daaee4ddddc8bf30.tar.bz2
otp-f54f5e00aaa3858e506c3d97daaee4ddddc8bf30.zip
Add type information for erlang:binary_part/2,3
Diffstat (limited to 'lib/hipe/cerl/erl_bif_types.erl')
-rw-r--r--lib/hipe/cerl/erl_bif_types.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl
index 8fa2ead18c..27f718d9d4 100644
--- a/lib/hipe/cerl/erl_bif_types.erl
+++ b/lib/hipe/cerl/erl_bif_types.erl
@@ -691,6 +691,10 @@ type(erlang, atom_to_binary, 2, Xs) ->
strict(arg_types(erlang, atom_to_binary, 2), Xs, fun (_) -> t_binary() end);
type(erlang, atom_to_list, 1, Xs) ->
strict(arg_types(erlang, atom_to_list, 1), Xs, fun (_) -> t_string() end);
+type(erlang, binary_part, 2, Xs) ->
+ strict(arg_types(erlang, binary_part, 2), Xs, fun (_) -> t_binary() end);
+type(erlang, binary_part, 3, Xs) ->
+ strict(arg_types(erlang, binary_part, 3), Xs, fun (_) -> t_binary() end);
type(erlang, binary_to_atom, 2, Xs) ->
strict(arg_types(erlang, binary_to_atom, 2), Xs, fun (_) -> t_atom() end);
type(erlang, binary_to_existing_atom, 2, Xs) ->
@@ -3404,6 +3408,10 @@ arg_types(erlang, atom_to_binary, 2) ->
[t_atom(), t_encoding_a2b()];
arg_types(erlang, atom_to_list, 1) ->
[t_atom()];
+arg_types(erlang, binary_part, 2) ->
+ [t_binary(), t_tuple([t_integer(),t_integer()])];
+arg_types(erlang, binary_part, 3) ->
+ [t_binary(), t_integer(), t_integer()];
arg_types(erlang, binary_to_atom, 2) ->
[t_binary(), t_encoding_a2b()];
arg_types(erlang, binary_to_existing_atom, 2) ->