Don't show calls to primops in stack traces

Since they don't have location information, they just give you crap
like:

  while evaluating the builtin function `getAttr':
  while evaluating the builtin function `derivationStrict':
  ...
This commit is contained in:
Eelco Dolstra 2013-10-05 21:29:48 +00:00
parent c945f015de
commit 176c666f36

View file

@ -728,12 +728,7 @@ void EvalState::callFunction(Value & fun, Value & arg, Value & v)
/* And call the primop. */ /* And call the primop. */
nrPrimOpCalls++; nrPrimOpCalls++;
if (countCalls) primOpCalls[primOp->primOp->name]++; if (countCalls) primOpCalls[primOp->primOp->name]++;
try {
primOp->primOp->fun(*this, vArgs, v); primOp->primOp->fun(*this, vArgs, v);
} catch (Error & e) {
addErrorPrefix(e, "while evaluating the builtin function `%1%':\n", primOp->primOp->name);
throw;
}
} else { } else {
v.type = tPrimOpApp; v.type = tPrimOpApp;
v.primOpApp.left = allocValue(); v.primOpApp.left = allocValue();