The R Project SVN R

Rev

Rev 69108 | Rev 70845 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 69108 Rev 70827
Line 1246... Line 1246...
1246
	    errorcall(call,
1246
	    errorcall(call,
1247
		      _("Incorrect number of arguments (%d), expecting %d for '%s'"),
1247
		      _("Incorrect number of arguments (%d), expecting %d for '%s'"),
1248
		      nargs, symbol.symbol.call->numArgs, buf);
1248
		      nargs, symbol.symbol.call->numArgs, buf);
1249
    }
1249
    }
1250
 
1250
 
-
 
1251
    if (R_check_constants < 4)
1251
    retval = R_doDotCall(ofun, nargs, cargs, call);
1252
	retval = R_doDotCall(ofun, nargs, cargs, call);
-
 
1253
    else {
-
 
1254
	SEXP *cargscp = (SEXP *) R_alloc(nargs, sizeof(SEXP));
-
 
1255
	int i;
-
 
1256
	for(i = 0; i < nargs; i++)
-
 
1257
	    cargscp[i] = PROTECT(duplicate(cargs[i]));
-
 
1258
	retval = R_doDotCall(ofun, nargs, cargs, call);
-
 
1259
	Rboolean constsOK = TRUE;
-
 
1260
	for(i = 0; constsOK && i < nargs; i++)
-
 
1261
            /* 7: not numerical comparison, not single NA, not attributes as
-
 
1262
	       set, do ignore byte-code, do ignore environments of closures */
-
 
1263
            if (!R_compute_identical(cargs[i], cargscp[i], 7)
-
 
1264
		    && !R_checkConstants(FALSE))
-
 
1265
		constsOK = FALSE;
-
 
1266
	if (!constsOK) {
-
 
1267
	    REprintf("ERROR: detected compiler constant(s) modification after"
-
 
1268
		" .Call invocation of function %s.\n", buf);
-
 
1269
	    for(i = 0; i < nargs; i++)
-
 
1270
		if (!R_compute_identical(cargs[i], cargscp[i], 7))
-
 
1271
		    REprintf("NOTE: .Call function %s modified its argument"
-
 
1272
			" (number %d, type %s, length %d)\n",
-
 
1273
			buf,
-
 
1274
			i + 1,
-
 
1275
			CHAR(type2str(TYPEOF(cargscp[i]))),
-
 
1276
			length(cargscp[i])
-
 
1277
		    );
-
 
1278
	    R_Suicide("compiler constants were modified (in .Call?)!\n");
-
 
1279
	}
-
 
1280
	UNPROTECT(nargs);
-
 
1281
    }
1252
    vmaxset(vmax);
1282
    vmaxset(vmax);
1253
    return retval;
1283
    return retval;
1254
}
1284
}
1255
 
1285
 
1256
/*  Call dynamically loaded "internal" graphics functions
1286
/*  Call dynamically loaded "internal" graphics functions