aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-08 05:37:19 +0100
committereldritch horrors <pennae@lix.systems>2024-03-09 00:25:54 -0700
commitf7b2476415906097404532c7485622eb37cf17e0 (patch)
tree5b06eb44c4c6c8d35b1ad86811c88f570be89d7d /src/libexpr/eval.hh
parent92693973b6e059e9d6056cf6547cc66459efc580 (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/eval.hh')
-rw-r--r--src/libexpr/eval.hh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 8355e443e..3f661e73e 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -206,6 +206,8 @@ public:
sPrefix,
sOutputSpecified;
+ const Expr::AstSymbols exprSymbols;
+
/**
* If set, force copying files to the Nix store even if they
* already exist there.