diff options
author | Fredrik Gustafsson <[email protected]> | 2013-03-27 12:17:51 +0100 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-03-27 12:17:51 +0100 |
commit | def9f08b475c24f65980b0b1efcf39f7ed7064c9 (patch) | |
tree | 75376f470898d15eb4c38059dbc3a2e6cba1265e /lib/hipe/icode | |
parent | e755c19236d19447efcf1809792e9c69ff970de0 (diff) | |
parent | 3d98819b66ed080bea199a5f33984d3213ef97f2 (diff) | |
download | otp-def9f08b475c24f65980b0b1efcf39f7ed7064c9.tar.gz otp-def9f08b475c24f65980b0b1efcf39f7ed7064c9.tar.bz2 otp-def9f08b475c24f65980b0b1efcf39f7ed7064c9.zip |
Merge branch 'ks/hipe-cleanup/OTP-10985' into maint
* ks/hipe-cleanup/OTP-10985:
Fix handling of bs_match_string translation
Take out 'constant' type test and unnecessary type declaration
Take out 'constant' type test from left over comments
Enable more warnings
Use remote type instead of relying on hipe_icode.hrl
Add type info for hipe_bifs:nstack_used_size/0
Use correct type name
Update a comment
Diffstat (limited to 'lib/hipe/icode')
-rw-r--r-- | lib/hipe/icode/Makefile | 2 | ||||
-rw-r--r-- | lib/hipe/icode/hipe_icode.erl | 2 | ||||
-rw-r--r-- | lib/hipe/icode/hipe_icode.hrl | 8 | ||||
-rw-r--r-- | lib/hipe/icode/hipe_icode_callgraph.erl | 2 | ||||
-rw-r--r-- | lib/hipe/icode/hipe_icode_ssa_struct_reuse.erl | 18 |
5 files changed, 12 insertions, 20 deletions
diff --git a/lib/hipe/icode/Makefile b/lib/hipe/icode/Makefile index 0f2d6db39b..238f70cf59 100644 --- a/lib/hipe/icode/Makefile +++ b/lib/hipe/icode/Makefile @@ -83,7 +83,7 @@ DOC_FILES= $(DOC_MODULES:%=$(DOCS)/%.html) include ../native.mk -ERL_COMPILE_FLAGS += +warn_unused_import +warn_missing_spec # +warn_untyped_record +ERL_COMPILE_FLAGS += +warn_unused_import +warn_exported_vars +warn_missing_spec # +warn_untyped_record # ---------------------------------------------------- # Targets diff --git a/lib/hipe/icode/hipe_icode.erl b/lib/hipe/icode/hipe_icode.erl index 3e211bf385..dfea092af2 100644 --- a/lib/hipe/icode/hipe_icode.erl +++ b/lib/hipe/icode/hipe_icode.erl @@ -261,7 +261,6 @@ %% {tuple, N} %% atom %% {atom, Atom} -%% constant %% number %% integer %% {integer, N} @@ -380,7 +379,6 @@ %% | {tuple, integer()} %% | atom %% | {atom, atom()} -%% | constant %% | number %% | integer %% | {integer, integer()} diff --git a/lib/hipe/icode/hipe_icode.hrl b/lib/hipe/icode/hipe_icode.hrl index d76eebf78d..89d297ef01 100644 --- a/lib/hipe/icode/hipe_icode.hrl +++ b/lib/hipe/icode/hipe_icode.hrl @@ -23,12 +23,6 @@ %%===================================================================== %%--------------------------------------------------------------------- -%% THIS DOES NOT REALLY BELONG HERE -- PLEASE REMOVE ASAP! -%%--------------------------------------------------------------------- - --type ordset(T) :: [T]. - -%%--------------------------------------------------------------------- %% Include files needed for the compilation of this header file %%--------------------------------------------------------------------- @@ -67,7 +61,7 @@ | 'op_exact_eqeq_2' | 'suspend_msg_timeout'. -type icode_type_test() :: 'atom' | 'bignum' | 'binary' | 'bitstr' | 'boolean' - | 'cons' | 'constant' | 'fixnum' | 'float' + | 'cons' | 'fixnum' | 'float' | 'function' | 'function2' | 'integer' | 'list' | 'nil' | 'number' | 'pid' | 'port' | 'reference' | 'tuple' | {'atom', atom()} | {'integer', integer()} diff --git a/lib/hipe/icode/hipe_icode_callgraph.erl b/lib/hipe/icode/hipe_icode_callgraph.erl index ae4b5785c4..6d004823e2 100644 --- a/lib/hipe/icode/hipe_icode_callgraph.erl +++ b/lib/hipe/icode/hipe_icode_callgraph.erl @@ -102,7 +102,7 @@ pp(#icode_callgraph{ordered_sccs = SCCs}) -> %%------------------------------------------------------------------------ %% Get the modules called from this module --spec get_called_modules([mfa_icode()]) -> ordset(atom()). +-spec get_called_modules([mfa_icode()]) -> ordsets:ordset(atom()). get_called_modules(List) -> get_remote_calls(List, []). diff --git a/lib/hipe/icode/hipe_icode_ssa_struct_reuse.erl b/lib/hipe/icode/hipe_icode_ssa_struct_reuse.erl index 675c8c1ad8..718d5d442b 100644 --- a/lib/hipe/icode/hipe_icode_ssa_struct_reuse.erl +++ b/lib/hipe/icode/hipe_icode_ssa_struct_reuse.erl @@ -129,8 +129,8 @@ maps_expr_key_enter(Expr, Maps) -> key = none :: 'none' | tuple(), % illegal_icode_instr() defs = none :: 'none' | [icode_var()], direct_replace = false :: boolean(), - inserts = ?SETS:new() :: ?SET(_), - use = ?SETS:new() :: ?SET(_)}). + inserts = ?SETS:new() :: ?SETS:?SET(_), + use = ?SETS:new() :: ?SETS:?SET(_)}). expr_id(#expr{id = Out}) -> Out. expr_defs(#expr{defs = Out}) -> Out. @@ -169,7 +169,7 @@ expr_create(Key, Defs) -> %% exprid - a expression value number which is the expression that %% the variable is defined by. --record(varinfo, {use = ?SETS:new() :: ?SET(_), +-record(varinfo, {use = ?SETS:new() :: ?SETS:?SET(_), ref = none :: 'none' | {non_neg_integer(), non_neg_integer()}, elem = none :: 'none' | {icode_var(), non_neg_integer()}, exprid = none :: 'none' | non_neg_integer()}). @@ -215,12 +215,12 @@ varinfo_use_add(#varinfo{use = UseSet} = I, Use) -> varmap = [] :: [{icode_var(), icode_var()}], pre_loop = false :: boolean(), non_struct_defs = gb_sets:new() :: gb_set(), - up_expr = none :: 'none' | ?SET(_), - killed_expr = none :: 'none' | ?SET(_), - sub_inserts = ?SETS:new() :: ?SET(_), - inserts = ?SETS:new() :: ?SET(_), - antic_in = none :: 'none' | ?SET(_), - antic_out = none :: 'none' | ?SET(_), + up_expr = none :: 'none' | ?SETS:?SET(_), + killed_expr = none :: 'none' | ?SETS:?SET(_), + sub_inserts = ?SETS:new() :: ?SETS:?SET(_), + inserts = ?SETS:new() :: ?SETS:?SET(_), + antic_in = none :: 'none' | ?SETS:?SET(_), + antic_out = none :: 'none' | ?SETS:?SET(_), struct_type = [] :: [struct_type()], struct_elems = [] :: [struct_elems()]}). |