From ff776f5091ba313b92f4acb22e318275ea5309cf Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sat, 26 Apr 2025 22:14:05 +0200 Subject: [PATCH] libexpr: don't determinePos for primop calls it's pointless, they don't have position information. Change-Id: I21f49e4d26f9ed7bc3772157882c84447f8e6387 --- lix/libexpr/eval.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lix/libexpr/eval.cc b/lix/libexpr/eval.cc index 8cee40a25..f67ba75c0 100644 --- a/lix/libexpr/eval.cc +++ b/lix/libexpr/eval.cc @@ -1650,7 +1650,7 @@ void EvalState::callFunction(Value & fun, size_t nrArgs, Value * * args, Value & if (ctx.stats.countCalls) ctx.stats.primOpCalls[fn->name]++; try { - fn->fun(*this, vCur.determinePos(noPos), args, vCur); + fn->fun(*this, noPos, args, vCur); } catch (ThrownError & e) { // Distinguish between an error that simply happened while "throw" // was being evaluated and an explicit thrown error. @@ -1708,7 +1708,7 @@ void EvalState::callFunction(Value & fun, size_t nrArgs, Value * * args, Value & // 1. Unify this and above code. Heavily redundant. // 2. Create a fake env (arg1, arg2, etc.) and a fake expr (arg1: arg2: etc: builtins.name arg1 arg2 etc) // so the debugger allows to inspect the wrong parameters passed to the builtin. - fn->fun(*this, vCur.determinePos(noPos), vArgs.data(), vCur); + fn->fun(*this, noPos, vArgs.data(), vCur); } catch (Error & e) { e.addTrace(ctx.positions[pos], "while calling the '%1%' builtin", fn->name); throw;