From 2e1f2ce523627ae27896fae8184412e608e4f3b9 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Wed, 15 Mar 2017 09:51:26 +0100 Subject: hipe: Optimize contract decoration somewhat --- lib/hipe/cerl/erl_types.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/hipe') diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl index 8b9b1241a0..3c6d42572a 100644 --- a/lib/hipe/cerl/erl_types.erl +++ b/lib/hipe/cerl/erl_types.erl @@ -614,7 +614,9 @@ t_find_unknown_opaque(T1, T2, Opaques) -> %% is assumed to be taken from the contract. t_decorate_with_opaque(T1, T2, Opaques) -> - case t_is_equal(T1, T2) orelse not t_contains_opaque(T2) of + case + Opaques =:= [] orelse t_is_equal(T1, T2) orelse not t_contains_opaque(T2) + of true -> T1; false -> T = t_inf(T1, T2), -- cgit v1.2.3