s is an sRef of a formal paramenter in a function call constraint
we trys to return a constraint expression derived from the actual parementer of a function call.
*/
-constraintExpr sRef_fixConstraintParam ( sRef s, exprNodeList args)
+/*@only@*/ constraintExpr sRef_fixConstraintParam (/*@observer@*/ sRef s, /*@observer@*/ /*@temp@*/ exprNodeList args)
{
constraintExpr ce;
{
case SK_RESULT:
{
+ // s = sRef_saveCopy(s);
ce = constraintExpr_makeTermsRef (s);
return ce;
}
{
sRef temp;
temp = (sRef_makePointer (sRef_fixBaseParam (s->info->ref, args)));
+ //temp = sRef_saveCopy(temp);
ce = constraintExpr_makeTermsRef (temp);
return ce;
}
case SK_ARRAYFETCH:
{
sRef temp;
- temp = sRef_fixBaseParam (s, args);
+ temp = sRef_saveCopy(s);
+ temp = sRef_fixBaseParam (temp, args);
ce = constraintExpr_makeTermsRef (temp);
return ce;
}
case SK_CVAR:
- ce = constraintExpr_makeTermsRef (s);
- return ce;
+ {
+ sRef temp;
+ temp = sRef_saveCopy(s);
+ ce = constraintExpr_makeTermsRef (temp);
+ return ce;
+ }
case SK_PARAM:
llassert(exprNodeList_size (args) > s->info->paramno);
{
}
default:
- llcontbug ((message("Trying to do fixConstraintParam on nonparam, nonglobal: %s for function with arguments %s", sRef_unparse (s), exprNodeList_unparse(args) ) ));
- ce = constraintExpr_makeTermsRef (s);
+ {
+ sRef temp;
+ llcontbug ((message("Trying to do fixConstraintParam on nonparam, nonglobal: %q for function with arguments %q", sRef_unparse (s), exprNodeList_unparse(args) ) ));
+ temp = sRef_saveCopy(s);
+ ce = constraintExpr_makeTermsRef (temp);
return ce;
+ }
}