From 94ab93b5d1e3b952fd55a8f3bf03146ee43de8ab Mon Sep 17 00:00:00 2001 From: Stavros Aronis Date: Fri, 25 Nov 2011 01:11:06 +0100 Subject: Fix Dialyzer's warnings in HiPE --- lib/hipe/icode/hipe_icode_coordinator.erl | 9 +++++++-- lib/hipe/icode/hipe_icode_mulret.erl | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'lib/hipe/icode') diff --git a/lib/hipe/icode/hipe_icode_coordinator.erl b/lib/hipe/icode/hipe_icode_coordinator.erl index a71e143192..d2defa0c90 100644 --- a/lib/hipe/icode/hipe_icode_coordinator.erl +++ b/lib/hipe/icode/hipe_icode_coordinator.erl @@ -49,6 +49,12 @@ coordinate(CG, Escaping, NonEscaping, Mod) -> fun (PM) -> last_action(PM, ServerPid, Mod, All) end, coordinate({Clean,All}, CG, gb_trees:empty(), Restart, LastAction, ServerPid). +-type mfalists() :: {[mfa()], [mfa()]}. + +-spec coordinate(mfalists(), hipe_digraph:hdg(), gb_tree(), + fun((mfalists(), gb_tree()) -> mfalists()), + fun((gb_tree()) -> 'ok'), pid()) -> no_return(). + coordinate(MFALists, CG, PM, Restart, LastAction, ServerPid) -> case MFALists of {[], []} -> @@ -106,8 +112,7 @@ last_action(PM, ServerPid, Mod, All) -> receive {done_rewrite, MFA} -> ok end - end, All), - ok. + end, All). restart_funs({Queue, Busy} = QB, PM, All, ServerPid) -> case ?MAX_CONCURRENT - length(Busy) of diff --git a/lib/hipe/icode/hipe_icode_mulret.erl b/lib/hipe/icode/hipe_icode_mulret.erl index a6529c8519..0579867e2f 100644 --- a/lib/hipe/icode/hipe_icode_mulret.erl +++ b/lib/hipe/icode/hipe_icode_mulret.erl @@ -595,9 +595,9 @@ optimizeDefine([I|Code], Dsts, DstLst, Res) -> [Ds] = Dsts, case isCallPrimop(I, mktuple) andalso DstLst =:= [] of true -> - case (hipe_icode:call_dstlist(I) =:= Dsts) of + case hipe_icode:call_dstlist(I) =:= Dsts of true -> - case (hipe_icode:call_args(I) > 1) of + case length(hipe_icode:call_args(I)) > 1 of true -> optimizeDefine(Code, Dsts, hipe_icode:call_args(I), Res); false -> -- cgit v1.2.3