aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/cerl/erl_types.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-08-21 09:26:56 +0200
committerHans Bolinder <[email protected]>2014-08-21 09:26:56 +0200
commit305bfc3360acfae8af75b36e00c61298b6ea582e (patch)
tree11300443a664f962db49adbc1123dd9d69a50e49 /lib/hipe/cerl/erl_types.erl
parentdaed987f7ebae3fc8f969b4f55f225837267411b (diff)
parent6eac68854c414285b7a99f27196bbbfa7969b295 (diff)
downloadotp-305bfc3360acfae8af75b36e00c61298b6ea582e.tar.gz
otp-305bfc3360acfae8af75b36e00c61298b6ea582e.tar.bz2
otp-305bfc3360acfae8af75b36e00c61298b6ea582e.zip
Merge branch 'hb/dialyzer/bugfixes/OTP-12018' into maint
* hb/dialyzer/bugfixes/OTP-12018: 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 0927c17b6b..4b2bec5fa8 100644
--- a/lib/hipe/cerl/erl_types.erl
+++ b/lib/hipe/cerl/erl_types.erl
@@ -262,6 +262,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
%%
@@ -1770,6 +1772,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) ->