Get rid of the parse tree cache
Since we already cache files in normal form (fileEvalCache), caching parse trees is redundant. Note that getting rid of this cache doesn't actually save much memory at the moment, because parse trees are currently not freed / GC'ed.
This commit is contained in:
		
							parent
							
								
									57d18df7d0
								
							
						
					
					
						commit
						6f809194d7
					
				
					 6 changed files with 35 additions and 34 deletions
				
			
		|  | @ -131,7 +131,7 @@ static void getAllExprs(EvalState & state, | |||
|             if (hasSuffix(attrName, ".nix")) | ||||
|                 attrName = string(attrName, 0, attrName.size() - 4); | ||||
|             attrs.attrs[state.symbols.create(attrName)] = | ||||
|                 ExprAttrs::AttrDef(state.parseExprFromFile(absPath(path2)), noPos); | ||||
|                 ExprAttrs::AttrDef(state.parseExprFromFile(resolveExprPath(absPath(path2))), noPos); | ||||
|         } | ||||
|         else | ||||
|             /* `path2' is a directory (with no default.nix in it);
 | ||||
|  | @ -143,7 +143,7 @@ static void getAllExprs(EvalState & state, | |||
| 
 | ||||
| static Expr * loadSourceExpr(EvalState & state, const Path & path) | ||||
| { | ||||
|     if (isNixExpr(path)) return state.parseExprFromFile(absPath(path)); | ||||
|     if (isNixExpr(path)) return state.parseExprFromFile(resolveExprPath(absPath(path))); | ||||
| 
 | ||||
|     /* The path is a directory.  Put the Nix expressions in the
 | ||||
|        directory in an attribute set, with the file name of each | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue