From a798efc77b0b2247864f7bb405c1265c3a276494 Mon Sep 17 00:00:00 2001 From: sterni Date: Sun, 18 Sep 2022 15:46:30 +0200 Subject: docs(tvix/eval): note C++ implementation details for C++ Nix 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 Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/eval/docs/recursive-attrs.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tvix/eval/docs') diff --git a/tvix/eval/docs/recursive-attrs.md b/tvix/eval/docs/recursive-attrs.md index 7776ff8279..c30cfd33e6 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) -- cgit 1.4.1