diff options
author | Hans Bolinder <[email protected]> | 2014-08-21 09:29:50 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2014-08-21 09:29:50 +0200 |
commit | 05d8ce4d317df08076433296449083e9848b4d2d (patch) | |
tree | 8b9a919d8dd337b2da74ee3c8e4f19aa6a04e689 /lib/hipe/cerl/erl_types.erl | |
parent | 0f0befab60ccd0bb75972932299a2b4c0522325a (diff) | |
parent | 305bfc3360acfae8af75b36e00c61298b6ea582e (diff) | |
download | otp-05d8ce4d317df08076433296449083e9848b4d2d.tar.gz otp-05d8ce4d317df08076433296449083e9848b4d2d.tar.bz2 otp-05d8ce4d317df08076433296449083e9848b4d2d.zip |
Merge branch 'maint'
* maint:
dialyzer, hipe: Fix a bug concerning is_record/2,3
Diffstat (limited to 'lib/hipe/cerl/erl_types.erl')
-rw-r--r-- | lib/hipe/cerl/erl_types.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl index b8ae31b622..5124e7238a 100644 --- a/lib/hipe/cerl/erl_types.erl +++ b/lib/hipe/cerl/erl_types.erl @@ -260,6 +260,8 @@ -define(TAG_IMMED1_SIZE, 4). -define(BITS, (erlang:system_info(wordsize) * 8) - ?TAG_IMMED1_SIZE). +-define(MAX_TUPLE_SIZE, (1 bsl 10)). + %%----------------------------------------------------------------------------- %% Type tags and qualifiers %% @@ -1753,6 +1755,8 @@ t_tuple() -> -spec t_tuple(non_neg_integer() | [erl_type()]) -> erl_type(). +t_tuple(N) when is_integer(N), N > ?MAX_TUPLE_SIZE -> + t_tuple(); t_tuple(N) when is_integer(N) -> ?tuple(lists:duplicate(N, ?any), N, ?any); t_tuple(List) -> |