diff options
author | Kostis Sagonas <[email protected]> | 2016-05-27 16:51:44 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-05-31 12:19:59 +0200 |
commit | 694cd826c34c1ae0f5a7aed79459edb102971934 (patch) | |
tree | e027aa8e952310b52795b4f145bb18c346795520 /lib/hipe/icode/hipe_icode.erl | |
parent | 8a27b1fdeee657275d16adbfca3a4082bda5e0e2 (diff) | |
download | otp-694cd826c34c1ae0f5a7aed79459edb102971934.tar.gz otp-694cd826c34c1ae0f5a7aed79459edb102971934.tar.bz2 otp-694cd826c34c1ae0f5a7aed79459edb102971934.zip |
Define, export and use a hipe_icode:params() type
Diffstat (limited to 'lib/hipe/icode/hipe_icode.erl')
-rw-r--r-- | lib/hipe/icode/hipe_icode.erl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/hipe/icode/hipe_icode.erl b/lib/hipe/icode/hipe_icode.erl index 07d230491d..78508dff22 100644 --- a/lib/hipe/icode/hipe_icode.erl +++ b/lib/hipe/icode/hipe_icode.erl @@ -610,7 +610,9 @@ %% Exported types %% --export_type([icode/0]). +-export_type([icode/0, params/0]). + +-type params() :: [icode_var()]. %%--------------------------------------------------------------------- %% @@ -618,7 +620,7 @@ %% %%--------------------------------------------------------------------- --spec mk_icode(mfa(), [icode_var()], boolean(), boolean(), [icode_instr()], +-spec mk_icode(mfa(), params(), boolean(), boolean(), [icode_instr()], {non_neg_integer(),non_neg_integer()}, {icode_lbl(),icode_lbl()}) -> icode(). mk_icode(Fun, Params, IsClosure, IsLeaf, Code, VarRange, LabelRange) -> @@ -629,7 +631,7 @@ mk_icode(Fun, Params, IsClosure, IsLeaf, Code, VarRange, LabelRange) -> var_range=VarRange, label_range=LabelRange}. --spec mk_icode(mfa(), [icode_var()], boolean(), boolean(), [icode_instr()], +-spec mk_icode(mfa(), params(), boolean(), boolean(), [icode_instr()], hipe_consttab(), {non_neg_integer(),non_neg_integer()}, {icode_lbl(),icode_lbl()}) -> icode(). mk_icode(Fun, Params, IsClosure, IsLeaf, Code, Data, VarRange, LabelRange) -> @@ -640,11 +642,11 @@ mk_icode(Fun, Params, IsClosure, IsLeaf, Code, Data, VarRange, LabelRange) -> -spec icode_fun(icode()) -> mfa(). icode_fun(#icode{'fun' = MFA}) -> MFA. --spec icode_params(icode()) -> [icode_var()]. +-spec icode_params(icode()) -> params(). icode_params(#icode{params = Params}) -> Params. --spec icode_params_update(icode(), [icode_var()]) -> icode(). -icode_params_update(Icode, Params) -> +-spec icode_params_update(icode(), params()) -> icode(). +icode_params_update(Icode, Params) -> Icode#icode{params = Params}. -spec icode_is_closure(icode()) -> boolean(). |