diff options
author | Kostis Sagonas <[email protected]> | 2014-02-26 00:07:35 +0100 |
---|---|---|
committer | Kostis Sagonas <[email protected]> | 2014-02-26 00:07:35 +0100 |
commit | 046c8569956a9b724058e6737421f145bf399024 (patch) | |
tree | 75f3458650bc6b9deeeb835a97a66738c1e277ee /lib/hipe | |
parent | c82da93ca6408eff459c379234ca7f0789160c27 (diff) | |
download | otp-046c8569956a9b724058e6737421f145bf399024.tar.gz otp-046c8569956a9b724058e6737421f145bf399024.tar.bz2 otp-046c8569956a9b724058e6737421f145bf399024.zip |
Introduce and use a hipe_icode:icode() type
Diffstat (limited to 'lib/hipe')
-rw-r--r-- | lib/hipe/icode/hipe_icode.erl | 13 | ||||
-rw-r--r-- | lib/hipe/icode/hipe_icode.hrl | 1 |
2 files changed, 10 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()]. diff --git a/lib/hipe/icode/hipe_icode.hrl b/lib/hipe/icode/hipe_icode.hrl index 060493e61e..25deac5152 100644 --- a/lib/hipe/icode/hipe_icode.hrl +++ b/lib/hipe/icode/hipe_icode.hrl @@ -178,5 +178,6 @@ var_range :: {non_neg_integer(), non_neg_integer()}, label_range :: {icode_lbl(), icode_lbl()}, info = [] :: icode_info()}). +-type icode() :: #icode{}. %%--------------------------------------------------------------------- |