1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

Make function calls tail-recursive

This commit is contained in:
Eelco Dolstra 2013-11-07 17:04:36 +00:00
parent 273322c773
commit c897bac549
4 changed files with 65 additions and 40 deletions

View file

@ -227,6 +227,7 @@ public:
bool eqValues(Value & v1, Value & v2);
void callFunction(Value & fun, Value & arg, Value & v);
void callPrimOp(Value & fun, Value & arg, Value & v);
/* Automatically call a function for which each argument has a
default value or has a binding in the `args' map. */
@ -268,6 +269,8 @@ private:
typedef std::map<ExprLambda *, unsigned int> FunctionCalls;
FunctionCalls functionCalls;
void incrFunctionCall(ExprLambda * fun);
typedef std::map<Pos, unsigned int> AttrSelects;
AttrSelects attrSelects;