about summary refs log tree commit diff
path: root/tvix/eval/docs/recursive-attrs.md
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2022-09-18T13·46+0200
committerclbot <clbot@tvl.fyi>2022-09-18T15·01+0000
commita798efc77b0b2247864f7bb405c1265c3a276494 (patch)
tree2631bfdec9f977f6726f8f74e36ce1f2b4216755 /tvix/eval/docs/recursive-attrs.md
parent3410b8979ef514b245dee47acc20a45a4f4b73be (diff)
docs(tvix/eval): note C++ implementation details for C++ Nix r/4896
Just want to note those down somewhere before I forget them again,
we can delete them later if we have it all figured out.

Change-Id: Icafa2d8fc7ca39e38e9637b7eca6f2bbf487c2b8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6632
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/docs/recursive-attrs.md')
-rw-r--r--tvix/eval/docs/recursive-attrs.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/tvix/eval/docs/recursive-attrs.md b/tvix/eval/docs/recursive-attrs.md
index 7776ff82793f..c30cfd33e6c7 100644
--- a/tvix/eval/docs/recursive-attrs.md
+++ b/tvix/eval/docs/recursive-attrs.md
@@ -58,3 +58,11 @@ bindings.
 In practice, we can further specialise this and compile each scope
 directly into the form expected by `OpAttrs` (that is, leaving
 attribute names on the stack) before each value's position.
+
+C++ Nix's Implementation
+------------------------
+
+* [`ExprAttrs`](https://github.com/NixOS/nix/blob/2097c30b08af19a9b42705fbc07463bea60dfb5b/src/libexpr/nixexpr.hh#L241-L268)
+  (AST representation of attribute sets)
+* [`ExprAttrs::eval`](https://github.com/NixOS/nix/blob/075bf6e5565aff9fba0ea02f3333c82adf4dccee/src/libexpr/eval.cc#L1333-L1414)
+* [`addAttr`](https://github.com/NixOS/nix/blob/master/src/libexpr/parser.y#L98-L156) (`ExprAttrs` construction in the parser)