mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 08:12:29 +00:00
* Option to turn off position information to test the impact on
maximal sharing.
This commit is contained in:
parent
e23d134b85
commit
a10da8466f
@ -22,6 +22,7 @@ int cacheTerms;
|
||||
bool shortCircuit;
|
||||
bool closedTerms; // don't substitute under terms known to be closed
|
||||
bool substCache; // memoization of the term substitution function
|
||||
bool posInfo; // attach position info to functions, assertions, attributes
|
||||
|
||||
#define maxActiveCalls 4096
|
||||
|
||||
@ -43,6 +44,7 @@ EvalState::EvalState()
|
||||
strictMode = getEnv("NIX_STRICT", "0") == "1";
|
||||
closedTerms = getEnv("NIX_CLOSED_TERMS", "1") == "1";
|
||||
substCache = getEnv("NIX_SUBST_CACHE", "1") == "1";
|
||||
posInfo = getEnv("NIX_POS_INFO", "1") == "1";
|
||||
|
||||
ATprotectMemory(activeCalls, maxActiveCalls);
|
||||
}
|
||||
|
@ -71,10 +71,12 @@ static Expr fixAttrs(int recursive, ATermList as)
|
||||
void backToString(yyscan_t scanner);
|
||||
|
||||
|
||||
extern bool posInfo;
|
||||
|
||||
static Pos makeCurPos(YYLTYPE * loc, ParseData * data)
|
||||
{
|
||||
return makePos(toATerm(data->path),
|
||||
loc->first_line, loc->first_column);
|
||||
return posInfo ? makePos(toATerm(data->path),
|
||||
loc->first_line, loc->first_column) : makeNoPos();
|
||||
}
|
||||
|
||||
#define CUR_POS makeCurPos(yylocp, data)
|
||||
|
Loading…
Reference in New Issue
Block a user