diff options
author | Jesper Louis Andersen <[email protected]> | 2010-12-16 03:33:10 +0100 |
---|---|---|
committer | Jesper Louis Andersen <[email protected]> | 2010-12-16 13:14:05 +0100 |
commit | 67dd153f6aff8dab6dc8d938664696675b152c20 (patch) | |
tree | 12fc7ea5ab58588e00a935a97dc39d82634e6867 /lib/hipe/cerl | |
parent | f7eaaee444b6d785bd2a9dbb86e96e6db0c04b4d (diff) | |
download | otp-67dd153f6aff8dab6dc8d938664696675b152c20.tar.gz otp-67dd153f6aff8dab6dc8d938664696675b152c20.tar.bz2 otp-67dd153f6aff8dab6dc8d938664696675b152c20.zip |
Fix type specification of the ets:new/2 BIF
The options for the ets:new/2 call has changed recently. There are
read_concurrency hints as well as compressed tables. The hipe/dialyzer
did not take this into account. This patch corrects the problem by
going through the documentation and altering the type specification.
The error fixed is with the dialyzer. When constructing an ETS table
with, e.g., {read_concurrency, true}, the dialyzer will report that the
caller of ets:new/2 will not return.
; First, we update the documentation from the ets man page.
; Second, we reorder the type specification of keypos so they appear
in the same order as in the documentation.
; Finally, we add the missing read_concurrency and compressed Tweak
options.
Diffstat (limited to 'lib/hipe/cerl')
-rw-r--r-- | lib/hipe/cerl/erl_bif_types.erl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl index ed5bf03804..9bddcc980f 100644 --- a/lib/hipe/cerl/erl_bif_types.erl +++ b/lib/hipe/cerl/erl_bif_types.erl @@ -4940,10 +4940,11 @@ t_matchres() -> %% From the 'ets' documentation %%----------------------------- %% Option = Type | Access | named_table | {keypos,Pos} -%% | {heir,pid(),HeirData} | {heir,none} -%% | {write_concurrency,boolean()} +%% | {heir,pid(),HeirData} | {heir,none} | Tweaks %% Type = set | ordered_set | bag | duplicate_bag %% Access = public | protected | private +%% Tweaks = {write_concurrency,boolean()} +%% | {read_concurrency,boolean()} | compressed %% Pos = integer() %% HeirData = term() t_ets_new_options() -> @@ -4955,10 +4956,12 @@ t_ets_new_options() -> t_atom('protected'), t_atom('private'), t_atom('named_table'), + t_tuple([t_atom('keypos'), t_integer()]), t_tuple([t_atom('heir'), t_pid(), t_any()]), t_tuple([t_atom('heir'), t_atom('none')]), - t_tuple([t_atom('keypos'), t_integer()]), - t_tuple([t_atom('write_concurrency'), t_boolean()])])). + t_tuple([t_atom('write_concurrency'), t_boolean()]), + t_tuple([t_atom('read_concurrency'), t_boolean()]), + t_atom('compressed')])). t_ets_info_items() -> t_sup([t_atom('fixed'), |