diff options
author | Patrik Nyblom <[email protected]> | 2010-12-16 15:54:31 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2010-12-28 14:18:19 +0100 |
commit | 5aa0bc494167f30062eb1e4cc6968c3818ec35d1 (patch) | |
tree | 4c9a6aa974ce0fcb4d12031552917833826a01f9 /lib/hipe | |
parent | 7859736f126397e4a62ed9e0b4563c54d8dd1158 (diff) | |
download | otp-5aa0bc494167f30062eb1e4cc6968c3818ec35d1.tar.gz otp-5aa0bc494167f30062eb1e4cc6968c3818ec35d1.tar.bz2 otp-5aa0bc494167f30062eb1e4cc6968c3818ec35d1.zip |
Set types correctly for open_port({spawn_executable, ...
Diffstat (limited to 'lib/hipe')
-rw-r--r-- | lib/hipe/cerl/erl_bif_types.erl | 11 | ||||
-rw-r--r-- | lib/hipe/cerl/erl_types.erl | 6 |
2 files changed, 12 insertions, 5 deletions
diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl index eba95dc6af..f00821e450 100644 --- a/lib/hipe/cerl/erl_bif_types.erl +++ b/lib/hipe/cerl/erl_bif_types.erl @@ -125,7 +125,8 @@ t_tuple/1, t_tuple_args/1, t_tuple_size/1, - t_tuple_subtypes/1 + t_tuple_subtypes/1, + t_unicode_string/0 ]). -ifdef(DO_ERL_BIF_TYPES_TEST). @@ -3800,7 +3801,7 @@ arg_types(erlang, now, 0) -> arg_types(erlang, open_port, 2) -> [t_sup(t_atom(), t_sup([t_tuple([t_atom('spawn'), t_string()]), t_tuple([t_atom('spawn_driver'), t_string()]), - t_tuple([t_atom('spawn_executable'), t_string()]), + t_tuple([t_atom('spawn_executable'), t_sup(t_unicode_string(),t_binary())]), t_tuple([t_atom('fd'), t_integer(), t_integer()])])), t_list(t_sup(t_sup([t_atom('stream'), t_atom('exit_status'), @@ -3816,8 +3817,8 @@ arg_types(erlang, open_port, 2) -> t_tuple([t_atom('line'), t_integer()]), t_tuple([t_atom('cd'), t_string()]), t_tuple([t_atom('env'), t_list(t_tuple(2))]), % XXX: More - t_tuple([t_atom('args'), t_list(t_string())]), - t_tuple([t_atom('arg0'), t_string()])])))]; + t_tuple([t_atom('args'), t_list(t_sup(t_unicode_string(),t_binary()))]), + t_tuple([t_atom('arg0'),t_sup(t_unicode_string(),t_binary())])])))]; arg_types(erlang, phash, 2) -> [t_any(), t_pos_integer()]; arg_types(erlang, phash2, 1) -> @@ -4979,7 +4980,7 @@ t_ets_info_items() -> %% ===================================================================== t_prim_file_name() -> - t_sup(t_string(), t_binary()). + t_sup(t_unicode_string(), t_binary()). %% ===================================================================== %% These are used for the built-in functions of 'gen_tcp' diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl index c8dc162457..080d6936b2 100644 --- a/lib/hipe/cerl/erl_types.erl +++ b/lib/hipe/cerl/erl_types.erl @@ -196,6 +196,7 @@ t_tuple_size/1, t_tuple_sizes/1, t_tuple_subtypes/1, + t_unicode_string/0, t_unify/2, t_unify/3, t_unit/0, @@ -1456,6 +1457,11 @@ t_is_tuple(_) -> false. %% Non-primitive types, including some handy syntactic sugar types %% +-spec t_unicode_string() -> erl_type(). + +t_unicode_string() -> + t_list(t_unicode_char()). + -spec t_charlist() -> erl_type(). t_charlist() -> |