mirror of
https://github.com/NixOS/nix.git
synced 2025-11-12 13:36:02 +01:00
evaluator. This was important because the NixOS expressions started
to hit 2 MB default stack size on Linux.
GCC is really dumb about stack space: it just adds up all the local
variables and temporaries of every scope into one huge stack frame.
This is really bad for deeply recursive functions. For instance,
every `throw Error(format("error message"))' causes a format object
of a few hundred bytes to be allocated on the stack. As a result,
every recursive call to evalExpr2() consumed 4680 bytes. By
splitting evalExpr2() and by moving the exception-throwing code out
of the main functions, evalExpr2() now only consumes 40 bytes.
Similar for evalExpr().
|
||
|---|---|---|
| .. | ||
| attr-path.cc | ||
| attr-path.hh | ||
| common-opts.cc | ||
| common-opts.hh | ||
| eval.cc | ||
| eval.hh | ||
| expr-to-xml.cc | ||
| expr-to-xml.hh | ||
| get-drvs.cc | ||
| get-drvs.hh | ||
| lexer.l | ||
| Makefile.am | ||
| nix.sdf | ||
| nixexpr-ast.def | ||
| nixexpr.cc | ||
| nixexpr.hh | ||
| parser.hh | ||
| parser.y | ||
| primops.cc | ||