From a225a9d6ff5e2ded63b0f7ce6259bf188a803469 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org>
Date: Mon, 24 Jun 2019 12:33:11 +0200
Subject: Eliminate dialyzer warnings

Eliminate the Dialyzer warnings shown when the limits in
lib/cerl/erl_types.erl were raised as follows:

    -define(TUPLE_TAG_LIMIT, 10).
    -define(TUPLE_ARITY_LIMIT, 10).
    -define(SET_LIMIT, 64).
---
 lib/compiler/src/beam_ssa.erl | 8 +++++---
 lib/compiler/src/cerl.erl     | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

(limited to 'lib/compiler')

diff --git a/lib/compiler/src/beam_ssa.erl b/lib/compiler/src/beam_ssa.erl
index a9977b0b1d..afd38dcd08 100644
--- a/lib/compiler/src/beam_ssa.erl
+++ b/lib/compiler/src/beam_ssa.erl
@@ -96,7 +96,8 @@
 %% To avoid the collapsing, change the value of SET_LIMIT to 50 in the
 %% file erl_types.erl in the hipe application.
 
--type prim_op() :: 'bs_add' | 'bs_extract' | 'bs_init' | 'bs_init_writable' |
+-type prim_op() :: 'bs_add' | 'bs_extract' | 'bs_get_tail' |
+                   'bs_init' | 'bs_init_writable' |
                    'bs_match' | 'bs_put' | 'bs_start_match' | 'bs_test_tail' |
                    'bs_utf16_size' | 'bs_utf8_size' | 'build_stacktrace' |
                    'call' | 'catch_end' |
@@ -117,9 +118,10 @@
                     '+' | '-' | '*' | '/'.
 
 %% Primops only used internally during code generation.
--type cg_prim_op() :: 'bs_get' | 'bs_match_string' | 'bs_restore' | 'bs_skip' |
+-type cg_prim_op() :: 'bs_get' | 'bs_get_position' | 'bs_match_string' |
+                      'bs_restore' | 'bs_save' | 'bs_set_position' | 'bs_skip' |
                       'copy' | 'put_tuple_arity' | 'put_tuple_element' |
-                      'set_tuple_element'.
+                      'put_tuple_elements' | 'set_tuple_element'.
 
 -import(lists, [foldl/3,keyfind/3,mapfoldl/3,member/2,reverse/1]).
 
diff --git a/lib/compiler/src/cerl.erl b/lib/compiler/src/cerl.erl
index 62cd5b5120..bc28f58712 100644
--- a/lib/compiler/src/cerl.erl
+++ b/lib/compiler/src/cerl.erl
@@ -263,7 +263,7 @@
 %% @see subtrees/1
 %% @see meta/1
 
--type ctype() :: 'alias'   | 'apply'  | 'binary' | 'bitrst' | 'call' | 'case'
+-type ctype() :: 'alias'   | 'apply'  | 'binary' | 'bitstr' | 'call' | 'case'
                | 'catch'   | 'clause' | 'cons'   | 'fun'    | 'let'  | 'letrec'
                | 'literal' | 'map'  | 'map_pair' | 'module' | 'primop'
                | 'receive' | 'seq'    | 'try'    | 'tuple'  | 'values' | 'var'.
-- 
cgit v1.2.3