diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-08 05:37:19 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-09 00:25:54 -0700 |
commit | f7b2476415906097404532c7485622eb37cf17e0 (patch) | |
tree | 5b06eb44c4c6c8d35b1ad86811c88f570be89d7d /src/libexpr/parser-state.hh | |
parent | 92693973b6e059e9d6056cf6547cc66459efc580 (diff) |
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.
(cherry picked from commit 09a1128d9e2ff0ae6176784938047350d6f8a782)
Change-Id: I73d9f66be4555168e048cb2d542277251580c2d1
Diffstat (limited to 'src/libexpr/parser-state.hh')
-rw-r--r-- | src/libexpr/parser-state.hh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libexpr/parser-state.hh b/src/libexpr/parser-state.hh index 34863c001..b0fb93767 100644 --- a/src/libexpr/parser-state.hh +++ b/src/libexpr/parser-state.hh @@ -42,6 +42,7 @@ struct ParserState { Expr * result; SourcePath basePath; PosTable::Origin origin; + 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); |