aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/icode/hipe_icode.erl
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2014-03-19 08:48:32 +0100
committerHenrik Nord <[email protected]>2014-03-19 08:48:32 +0100
commitd623f60a150e52f77491331529e172780dbc80ca (patch)
tree101da5f483c47ae4d74a5c3f82f4d56c2f812dcb /lib/hipe/icode/hipe_icode.erl
parentaab1afa8a63081f2c30f83ebe8b6caaac979795c (diff)
parent5795a20244dde1de8236eed8a0f43bc976bd1e0c (diff)
downloadotp-d623f60a150e52f77491331529e172780dbc80ca.tar.gz
otp-d623f60a150e52f77491331529e172780dbc80ca.tar.bz2
otp-d623f60a150e52f77491331529e172780dbc80ca.zip
Merge branch 'kostis/hipe-rc2-patch'
* kostis/hipe-rc2-patch: Cleanup and make sure warnings are treated as errors Add specs for exported functions (to shut off a warning) and types in some record fields Introduce and use a hipe_icode:icode() type Substitude uses of lists:reverse(L1) ++ L2 with lists:reverse(L1, L2)
Diffstat (limited to 'lib/hipe/icode/hipe_icode.erl')
-rw-r--r--lib/hipe/icode/hipe_icode.erl13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/hipe/icode/hipe_icode.erl b/lib/hipe/icode/hipe_icode.erl
index 0e651a351c..7b3d087e2d 100644
--- a/lib/hipe/icode/hipe_icode.erl
+++ b/lib/hipe/icode/hipe_icode.erl
@@ -503,7 +503,6 @@
enter_args_update/2,
enter_type/1,
is_enter/1,
-
mk_return/1, %% mk_return(Vars)
%% mk_fail/1, %% mk_fail(Args) class = exit
@@ -606,6 +605,12 @@
-export([highest_var/1, highest_label/1]).
+%%
+%% Exported types
+%%
+
+-export_type([icode/0]).
+
%%---------------------------------------------------------------------
%%
%% Icode
@@ -614,7 +619,7 @@
-spec mk_icode(mfa(), [icode_var()], boolean(), boolean(), [icode_instr()],
{non_neg_integer(),non_neg_integer()},
- {icode_lbl(),icode_lbl()}) -> #icode{}.
+ {icode_lbl(),icode_lbl()}) -> icode().
mk_icode(Fun, Params, IsClosure, IsLeaf, Code, VarRange, LabelRange) ->
#icode{'fun'=Fun, params=Params, code=Code,
is_closure=IsClosure,
@@ -1434,8 +1439,8 @@ subst1([_|Pairs], I) -> subst1(Pairs, I).
%%
%% @doc Returns the successors of an Icode instruction.
%% In CFG form only branch instructions have successors,
-%% but in linear form other instructions like e.g. moves and
-%% others might be the last instruction of some basic block.
+%% but in linear form other instructions like e.g. moves
+%% might be the last instruction of some basic block.
%%
-spec successors(icode_instr()) -> [icode_lbl()].