are no longer substituted inline.
ccf = openfile(ccname,"r");
while ((c = getcall(cf)) != (call_p) 0) {
/* process all calls */
- if (SUITABLE(c->cl_proc)) {
+ if (SUITABLE(c->cl_proc) && anal_params(c)) {
/* called proc. may be put in line */
- anal_params(c);
/* see which parameters may be put in line */
assign_ratio(c); /* assign a rank */
a = abstract(c); /* abstract essential info */
return (OFTEN_USED(fm) && !is_simple(act->ac_exp));
}
-anal_params(c)
+bool anal_params(c)
call_p c;
{
/* Determine which of the actual parameters of a
int inlpars = 0;
p = c->cl_proc; /* the called procedure */
- if (!INLINE_PARS(p) || !match_pars(p->P_FORMALS, c->cl_actuals)) {
+ if (!match_pars(p->P_FORMALS, c->cl_actuals)) return FALSE;
+ if (!INLINE_PARS(p)) {
for (act = c->cl_actuals; act != (actual_p) 0;
act = act->ac_next) {
NOT_INLINE(act);
}
- return; /* "# of inline pars." field in cl_flags remains 0 */
+ return TRUE; /* "# of inline pars." field in cl_flags remains 0 */
}
for (act = c->cl_actuals, form = p->P_FORMALS; act != (actual_p) 0;
act = act->ac_next, form = form->f_next) {
}
if (inlpars > 15) inlpars = 15; /* We've only got 4 bits! */
c->cl_flags |= inlpars; /* number of inline parameters */
+ return TRUE;
}
-extern anal_params(); /* (call_p c)
+extern bool anal_params(); /* (call_p c)
* See which parameters of the call
* may be expanded in line.
+ * If the formals and actuals do not
+ * match, return FALSE
*/
extern assign_ratio(); /* (call_p c)
* Assigna ratio number to the call,