return tmp;
}
+ assert(hd->getclass() == CEXPR);
CExpr *prog = (CExpr *)hd;
+ assert(prog->kids[1]->getclass() == CEXPR);
Expr **cur = ((CExpr *)prog->kids[1])->kids;
vector<Expr *> old_vals;
SymExpr *var;
else
{
while((var = (SymExpr *)*cur++)) {
+ // Check whether not enough arguments were supplied
+ if (i >= args.size()) {
+ for (size_t i = 0; i < args.size(); i++) {
+ args[i]->dec();
+ }
+ return NULL;
+ }
+
old_vals.push_back(var->val);
var->val = args[i++];
}
+ // Check whether too many arguments were supplied
+ if (i < args.size()) {
+ for (size_t i = 0; i < args.size(); i++) {
+ args[i]->dec();
+ }
+ return NULL;
+ }
+
if (dbg_prog) {
dbg_prog_indent(cout);
cout << "[";
cur = ((CExpr *)prog->kids[1])->kids;
i = 0;
while((var = (SymExpr *)*cur++)) {
+ assert(i < args.size());
args[i]->dec();
var->val = old_vals[i++];
}
(! xb bblt
(! rb bblt
(! xbb (bblast_term m x xb)
- (! c ( ^ (bblast_sextend xb k m) rb)
+ (! c ( ^ (bblast_sextend xb k) rb)
(bblast_term n (sign_extend n k m x) rb))))))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;