Removed a further simple trampoline.
This commit is contained in:
parent
128189bb54
commit
ad06600bd8
@ -31,15 +31,15 @@
|
|||||||
|
|
||||||
extern Term TERM_Hidden;
|
extern Term TERM_Hidden;
|
||||||
|
|
||||||
//! hide level within protocol
|
//! Helper for HideLevel
|
||||||
unsigned int
|
unsigned int
|
||||||
protocolHidelevel (const System sys, const Term t)
|
minlevel_itsends (const Protocol p, const Role r, const Term t)
|
||||||
{
|
{
|
||||||
|
Roledef rd;
|
||||||
unsigned int minlevel;
|
unsigned int minlevel;
|
||||||
|
|
||||||
int itsends (const Protocol p, const Role r)
|
minlevel = UINT_MAX;
|
||||||
{
|
for (rd = r->roledef; rd != NULL; rd = rd->next)
|
||||||
int sends (Roledef rd)
|
|
||||||
{
|
{
|
||||||
if (rd->type == SEND)
|
if (rd->type == SEND)
|
||||||
{
|
{
|
||||||
@ -55,15 +55,33 @@ protocolHidelevel (const System sys, const Term t)
|
|||||||
if (l < minlevel)
|
if (l < minlevel)
|
||||||
minlevel = l;
|
minlevel = l;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
return minlevel;
|
||||||
|
}
|
||||||
|
|
||||||
roledef_iterate_events (r->roledef, sends);
|
//! hide level within protocol
|
||||||
return true;
|
unsigned int
|
||||||
|
protocolHidelevel (const System sys, const Term t)
|
||||||
|
{
|
||||||
|
unsigned int minlevel;
|
||||||
|
Protocol p;
|
||||||
|
|
||||||
|
minlevel = UINT_MAX;
|
||||||
|
for (p = sys->protocols; p != NULL; p = p->next)
|
||||||
|
{
|
||||||
|
Role r;
|
||||||
|
|
||||||
|
for (r = p->roles; r != NULL; r = r->next)
|
||||||
|
{
|
||||||
|
unsigned int ml;
|
||||||
|
|
||||||
|
ml = minlevel_itsends (p, r, t);
|
||||||
|
if (ml < minlevel)
|
||||||
|
{
|
||||||
|
minlevel = ml;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
minlevel = INT_MAX;
|
|
||||||
iterateRoles (sys, itsends);
|
|
||||||
|
|
||||||
return minlevel;
|
return minlevel;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user