mirror of
https://github.com/NixOS/nix
synced 2025-06-26 20:01:15 +02:00
don't repeatedly look up ast internal symbols
these symbols are used a *lot*, so it makes sense to cache them. this mostly increases clarity of the code (however clear one may wish to call the parser desugaring here), but it also provides a small performance benefit.
This commit is contained in:
parent
b596cc9e79
commit
09a1128d9e
5 changed files with 36 additions and 15 deletions
|
@ -43,6 +43,7 @@ struct ParserState {
|
|||
SourcePath basePath;
|
||||
PosTable::Origin origin;
|
||||
const ref<InputAccessor> rootFS;
|
||||
const Expr::AstSymbols & s;
|
||||
|
||||
void dupAttr(const AttrPath & attrPath, const PosIdx pos, const PosIdx prevPos);
|
||||
void dupAttr(Symbol attr, const PosIdx pos, const PosIdx prevPos);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue