aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/eval.cc38
-rw-r--r--src/libexpr/eval.hh48
-rw-r--r--src/libexpr/nixexpr.cc2
-rw-r--r--src/libexpr/nixexpr.hh2
4 files changed, 45 insertions, 45 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index bd1cbaab5..f95ff4931 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -814,7 +814,7 @@ std::unique_ptr<ValMap> mapStaticEnvBindings(const SymbolTable & st, const Stati
of stack space, which is a real killer in the recursive
evaluator. So here are some helper functions for throwing
exceptions. */
-void EvalState::throwEvalError(const PosIdx pos, const char * s, Env & env, Expr & expr) const
+void EvalState::throwEvalError(const PosIdx pos, const char * s, Env & env, Expr & expr)
{
auto error = EvalError({
.msg = hintfmt(s),
@@ -824,7 +824,7 @@ void EvalState::throwEvalError(const PosIdx pos, const char * s, Env & env, Expr
debugThrow(error, env, expr);
}
-void EvalState::throwEvalError(const PosIdx pos, const char * s) const
+void EvalState::throwEvalError(const PosIdx pos, const char * s)
{
auto error = EvalError({
.msg = hintfmt(s),
@@ -834,7 +834,7 @@ void EvalState::throwEvalError(const PosIdx pos, const char * s) const
debugThrowLastTrace(error);
}
-void EvalState::throwEvalError(const char * s, const std::string & s2) const
+void EvalState::throwEvalError(const char * s, const std::string & s2)
{
auto error = EvalError(s, s2);
@@ -842,7 +842,7 @@ void EvalState::throwEvalError(const char * s, const std::string & s2) const
}
void EvalState::throwEvalError(const PosIdx pos, const Suggestions & suggestions, const char * s,
- const std::string & s2, Env & env, Expr & expr) const
+ const std::string & s2, Env & env, Expr & expr)
{
auto error = EvalError(ErrorInfo{
.msg = hintfmt(s, s2),
@@ -853,7 +853,7 @@ void EvalState::throwEvalError(const PosIdx pos, const Suggestions & suggestions
debugThrow(error, env, expr);
}
-void EvalState::throwEvalError(const PosIdx pos, const char * s, const std::string & s2) const
+void EvalState::throwEvalError(const PosIdx pos, const char * s, const std::string & s2)
{
auto error = EvalError({
.msg = hintfmt(s, s2),
@@ -863,7 +863,7 @@ void EvalState::throwEvalError(const PosIdx pos, const char * s, const std::stri
debugThrowLastTrace(error);
}
-void EvalState::throwEvalError(const PosIdx pos, const char * s, const std::string & s2, Env & env, Expr & expr) const
+void EvalState::throwEvalError(const PosIdx pos, const char * s, const std::string & s2, Env & env, Expr & expr)
{
auto error = EvalError({
.msg = hintfmt(s, s2),
@@ -874,7 +874,7 @@ void EvalState::throwEvalError(const PosIdx pos, const char * s, const std::stri
}
void EvalState::throwEvalError(const char * s, const std::string & s2,
- const std::string & s3) const
+ const std::string & s3)
{
auto error = EvalError({
.msg = hintfmt(s, s2),
@@ -885,7 +885,7 @@ void EvalState::throwEvalError(const char * s, const std::string & s2,
}
void EvalState::throwEvalError(const PosIdx pos, const char * s, const std::string & s2,
- const std::string & s3) const
+ const std::string & s3)
{
auto error = EvalError({
.msg = hintfmt(s, s2),
@@ -896,7 +896,7 @@ void EvalState::throwEvalError(const PosIdx pos, const char * s, const std::stri
}
void EvalState::throwEvalError(const PosIdx pos, const char * s, const std::string & s2,
- const std::string & s3, Env & env, Expr & expr) const
+ const std::string & s3, Env & env, Expr & expr)
{
auto error = EvalError({
.msg = hintfmt(s, s2),
@@ -906,7 +906,7 @@ void EvalState::throwEvalError(const PosIdx pos, const char * s, const std::stri
debugThrow(error, env, expr);
}
-void EvalState::throwEvalError(const PosIdx p1, const char * s, const Symbol sym, const PosIdx p2, Env & env, Expr & expr) const
+void EvalState::throwEvalError(const PosIdx p1, const char * s, const Symbol sym, const PosIdx p2, Env & env, Expr & expr)
{
// p1 is where the error occurred; p2 is a position mentioned in the message.
auto error = EvalError({
@@ -917,7 +917,7 @@ void EvalState::throwEvalError(const PosIdx p1, const char * s, const Symbol sym
debugThrow(error, env, expr);
}
-void EvalState::throwTypeError(const PosIdx pos, const char * s, const Value & v) const
+void EvalState::throwTypeError(const PosIdx pos, const char * s, const Value & v)
{
auto error = TypeError({
.msg = hintfmt(s, showType(v)),
@@ -927,7 +927,7 @@ void EvalState::throwTypeError(const PosIdx pos, const char * s, const Value & v
debugThrowLastTrace(error);
}
-void EvalState::throwTypeError(const PosIdx pos, const char * s, const Value & v, Env & env, Expr & expr) const
+void EvalState::throwTypeError(const PosIdx pos, const char * s, const Value & v, Env & env, Expr & expr)
{
auto error = TypeError({
.msg = hintfmt(s, showType(v)),
@@ -937,7 +937,7 @@ void EvalState::throwTypeError(const PosIdx pos, const char * s, const Value & v
debugThrow(error, env, expr);
}
-void EvalState::throwTypeError(const PosIdx pos, const char * s) const
+void EvalState::throwTypeError(const PosIdx pos, const char * s)
{
auto error = TypeError({
.msg = hintfmt(s),
@@ -948,7 +948,7 @@ void EvalState::throwTypeError(const PosIdx pos, const char * s) const
}
void EvalState::throwTypeError(const PosIdx pos, const char * s, const ExprLambda & fun,
- const Symbol s2, Env & env, Expr &expr) const
+ const Symbol s2, Env & env, Expr &expr)
{
auto error = TypeError({
.msg = hintfmt(s, fun.showNamePos(*this), symbols[s2]),
@@ -959,7 +959,7 @@ void EvalState::throwTypeError(const PosIdx pos, const char * s, const ExprLambd
}
void EvalState::throwTypeError(const PosIdx pos, const Suggestions & suggestions, const char * s,
- const ExprLambda & fun, const Symbol s2, Env & env, Expr &expr) const
+ const ExprLambda & fun, const Symbol s2, Env & env, Expr &expr)
{
auto error = TypeError(ErrorInfo {
.msg = hintfmt(s, fun.showNamePos(*this), symbols[s2]),
@@ -970,7 +970,7 @@ void EvalState::throwTypeError(const PosIdx pos, const Suggestions & suggestions
debugThrow(error, env, expr);
}
-void EvalState::throwTypeError(const char * s, const Value & v, Env & env, Expr &expr) const
+void EvalState::throwTypeError(const char * s, const Value & v, Env & env, Expr &expr)
{
auto error = TypeError({
.msg = hintfmt(s, showType(v)),
@@ -980,7 +980,7 @@ void EvalState::throwTypeError(const char * s, const Value & v, Env & env, Expr
debugThrow(error, env, expr);
}
-void EvalState::throwAssertionError(const PosIdx pos, const char * s, const std::string & s1, Env & env, Expr &expr) const
+void EvalState::throwAssertionError(const PosIdx pos, const char * s, const std::string & s1, Env & env, Expr &expr)
{
auto error = AssertionError({
.msg = hintfmt(s, s1),
@@ -990,7 +990,7 @@ void EvalState::throwAssertionError(const PosIdx pos, const char * s, const std:
debugThrow(error, env, expr);
}
-void EvalState::throwUndefinedVarError(const PosIdx pos, const char * s, const std::string & s1, Env & env, Expr &expr) const
+void EvalState::throwUndefinedVarError(const PosIdx pos, const char * s, const std::string & s1, Env & env, Expr &expr)
{
auto error = UndefinedVarError({
.msg = hintfmt(s, s1),
@@ -1000,7 +1000,7 @@ void EvalState::throwUndefinedVarError(const PosIdx pos, const char * s, const s
debugThrow(error, env, expr);
}
-void EvalState::throwMissingArgumentError(const PosIdx pos, const char * s, const std::string & s1, Env & env, Expr &expr) const
+void EvalState::throwMissingArgumentError(const PosIdx pos, const char * s, const std::string & s1, Env & env, Expr &expr)
{
auto error = MissingArgumentError({
.msg = hintfmt(s, s1),
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 5227c7ce1..763150dae 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -143,7 +143,7 @@ public:
template<class E>
[[gnu::noinline, gnu::noreturn]]
- void debugThrow(const E &error, const Env & env, const Expr & expr) const
+ void debugThrow(const E &error, const Env & env, const Expr & expr)
{
if (debuggerHook)
debuggerHook(*this, &error, env, expr);
@@ -153,7 +153,7 @@ public:
template<class E>
[[gnu::noinline, gnu::noreturn]]
- void debugThrowLastTrace(E & e) const
+ void debugThrowLastTrace(E & e)
{
// Call this in the situation where Expr and Env are inaccessible.
// The debugger will start in the last context that's in the
@@ -312,68 +312,68 @@ public:
std::string_view forceStringNoCtx(Value & v, const PosIdx pos = noPos);
[[gnu::noinline, gnu::noreturn]]
- void throwEvalError(const PosIdx pos, const char * s) const;
+ void throwEvalError(const PosIdx pos, const char * s);
[[gnu::noinline, gnu::noreturn]]
void throwEvalError(const PosIdx pos, const char * s,
- Env & env, Expr & expr) const;
+ Env & env, Expr & expr);
[[gnu::noinline, gnu::noreturn]]
- void throwEvalError(const char * s, const std::string & s2) const;
+ void throwEvalError(const char * s, const std::string & s2);
[[gnu::noinline, gnu::noreturn]]
- void throwEvalError(const PosIdx pos, const char * s, const std::string & s2) const;
+ void throwEvalError(const PosIdx pos, const char * s, const std::string & s2);
[[gnu::noinline, gnu::noreturn]]
void throwEvalError(const char * s, const std::string & s2,
- Env & env, Expr & expr) const;
+ Env & env, Expr & expr);
[[gnu::noinline, gnu::noreturn]]
void throwEvalError(const PosIdx pos, const char * s, const std::string & s2,
- Env & env, Expr & expr) const;
+ Env & env, Expr & expr);
[[gnu::noinline, gnu::noreturn]]
void throwEvalError(const char * s, const std::string & s2, const std::string & s3,
- Env & env, Expr & expr) const;
+ Env & env, Expr & expr);
[[gnu::noinline, gnu::noreturn]]
void throwEvalError(const PosIdx pos, const char * s, const std::string & s2, const std::string & s3,
- Env & env, Expr & expr) const;
+ Env & env, Expr & expr);
[[gnu::noinline, gnu::noreturn]]
- void throwEvalError(const PosIdx pos, const char * s, const std::string & s2, const std::string & s3) const;
+ void throwEvalError(const PosIdx pos, const char * s, const std::string & s2, const std::string & s3);
[[gnu::noinline, gnu::noreturn]]
- void throwEvalError(const char * s, const std::string & s2, const std::string & s3) const;
+ void throwEvalError(const char * s, const std::string & s2, const std::string & s3);
[[gnu::noinline, gnu::noreturn]]
void throwEvalError(const PosIdx pos, const Suggestions & suggestions, const char * s, const std::string & s2,
- Env & env, Expr & expr) const;
+ Env & env, Expr & expr);
[[gnu::noinline, gnu::noreturn]]
void throwEvalError(const PosIdx p1, const char * s, const Symbol sym, const PosIdx p2,
- Env & env, Expr & expr) const;
+ Env & env, Expr & expr);
[[gnu::noinline, gnu::noreturn]]
- void throwTypeError(const PosIdx pos, const char * s, const Value & v) const;
+ void throwTypeError(const PosIdx pos, const char * s, const Value & v);
[[gnu::noinline, gnu::noreturn]]
void throwTypeError(const PosIdx pos, const char * s, const Value & v,
- Env & env, Expr & expr) const;
+ Env & env, Expr & expr);
[[gnu::noinline, gnu::noreturn]]
- void throwTypeError(const PosIdx pos, const char * s) const;
+ void throwTypeError(const PosIdx pos, const char * s);
[[gnu::noinline, gnu::noreturn]]
void throwTypeError(const PosIdx pos, const char * s,
- Env & env, Expr & expr) const;
+ Env & env, Expr & expr);
[[gnu::noinline, gnu::noreturn]]
void throwTypeError(const PosIdx pos, const char * s, const ExprLambda & fun, const Symbol s2,
- Env & env, Expr & expr) const;
+ Env & env, Expr & expr);
[[gnu::noinline, gnu::noreturn]]
void throwTypeError(const PosIdx pos, const Suggestions & suggestions, const char * s, const ExprLambda & fun, const Symbol s2,
- Env & env, Expr & expr) const;
+ Env & env, Expr & expr);
[[gnu::noinline, gnu::noreturn]]
void throwTypeError(const char * s, const Value & v,
- Env & env, Expr & expr) const;
+ Env & env, Expr & expr);
[[gnu::noinline, gnu::noreturn]]
void throwAssertionError(const PosIdx pos, const char * s, const std::string & s1,
- Env & env, Expr & expr) const;
+ Env & env, Expr & expr);
[[gnu::noinline, gnu::noreturn]]
void throwUndefinedVarError(const PosIdx pos, const char * s, const std::string & s1,
- Env & env, Expr & expr) const;
+ Env & env, Expr & expr);
[[gnu::noinline, gnu::noreturn]]
void throwMissingArgumentError(const PosIdx pos, const char * s, const std::string & s1,
- Env & env, Expr & expr) const;
+ Env & env, Expr & expr);
[[gnu::noinline]]
void addErrorTrace(Error & e, const char * s, const std::string & s2) const;
diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc
index cb5e1c3f2..21b71d7c9 100644
--- a/src/libexpr/nixexpr.cc
+++ b/src/libexpr/nixexpr.cc
@@ -10,7 +10,7 @@ namespace nix {
/* Launch the nix debugger */
-std::function<void(const EvalState & evalState,const Error * error, const Env & env, const Expr & expr)> debuggerHook;
+std::function<void(EvalState & evalState,const Error * error, const Env & env, const Expr & expr)> debuggerHook;
/* Displaying abstract syntax trees. */
diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh
index 80b6afa3e..fdafb1711 100644
--- a/src/libexpr/nixexpr.hh
+++ b/src/libexpr/nixexpr.hh
@@ -22,7 +22,7 @@ MakeError(UndefinedVarError, Error);
MakeError(MissingArgumentError, EvalError);
MakeError(RestrictedPathError, Error);
-extern std::function<void(const EvalState & evalState, const Error * error, const Env & env, const Expr & expr)> debuggerHook;
+extern std::function<void(EvalState & evalState, const Error * error, const Env & env, const Expr & expr)> debuggerHook;
/* Position objects. */