aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/cerl/erl_types.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-08-21 09:29:50 +0200
committerHans Bolinder <[email protected]>2014-08-21 09:29:50 +0200
commit05d8ce4d317df08076433296449083e9848b4d2d (patch)
tree8b9a919d8dd337b2da74ee3c8e4f19aa6a04e689 /lib/hipe/cerl/erl_types.erl
parent0f0befab60ccd0bb75972932299a2b4c0522325a (diff)
parent305bfc3360acfae8af75b36e00c61298b6ea582e (diff)
downloadotp-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.erl4
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) ->