Fix stack consumption

This commit is contained in:
Eelco Dolstra 2015-07-31 20:28:25 +02:00
parent 75837651f1
commit 2bac04c5ff
2 changed files with 3 additions and 8 deletions

View file

@ -8,9 +8,9 @@
namespace nix { namespace nix {
LocalNoInlineNoReturn(void throwEvalError(const FormatOrString & fs)) LocalNoInlineNoReturn(void throwEvalError(const char * s, const Pos & pos))
{ {
throw EvalError(fs); throw EvalError(format(s) % pos);
} }
LocalNoInlineNoReturn(void throwTypeError(const char * s, const Value & v)) LocalNoInlineNoReturn(void throwTypeError(const char * s, const Value & v))
@ -44,7 +44,7 @@ void EvalState::forceValue(Value & v, const Pos & pos)
else if (v.type == tApp) else if (v.type == tApp)
callFunction(*v.app.left, *v.app.right, v, noPos); callFunction(*v.app.left, *v.app.right, v, noPos);
else if (v.type == tBlackhole) else if (v.type == tBlackhole)
throwEvalError(format("infinite recursion encountered, at %1%") % pos); throwEvalError("infinite recursion encountered, at %1%", pos);
} }

View file

@ -358,11 +358,6 @@ LocalNoInlineNoReturn(void throwEvalError(const char * s, const string & s2))
throw EvalError(format(s) % s2); throw EvalError(format(s) % s2);
} }
LocalNoInlineNoReturn(void throwEvalError(const char * s, const Pos & pos))
{
throw EvalError(format(s) % pos);
}
LocalNoInlineNoReturn(void throwEvalError(const char * s, const string & s2, const Pos & pos)) LocalNoInlineNoReturn(void throwEvalError(const char * s, const string & s2, const Pos & pos))
{ {
throw EvalError(format(s) % s2 % pos); throw EvalError(format(s) % s2 % pos);