tvl-depot/tvix/eval/docs
Vincent Ambo 32698766ef refactor(tvix/eval): statically resolve select from constant attrs
When resolving a select expression (`attrs.name` or `attrs.name or
default`), if the set compiles to a constant attribute set (as is most
notably the case with `builtins`) we can backtrack and replace that
attribute set directly with the compiled value.

For something like `builtins.length`, this will directly emit an
`OpConstant` that leaves the `length` builtin on the stack.

Change-Id: I639654e065a06e8cfcbcacb528c6da7ec9e513ee
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7957
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2023-02-03 18:47:33 +00:00
..
abandoned docs(tvix/eval): document abandoned thread-local vm 2022-11-08 08:41:04 +00:00
build-references.md docs(tvix): add build-references / string-context document 2023-01-12 11:01:40 +00:00
builtins.md feat(tvix/eval): implement builtins.split 2022-11-04 21:28:32 +00:00
known-optimisation-potential.md refactor(tvix/eval): statically resolve select from constant attrs 2023-02-03 18:47:33 +00:00
language-issues.md fix(tvix/eval): bring foldl' strictness in line with C++ Nix 2022-10-15 14:12:23 +00:00
opcodes-attrsets.md docs(tvix/eval): add design documentation for attrset opcodes 2022-08-13 15:31:50 +00:00
recursive-attrs.md docs(tvix/eval): note C++ implementation details for C++ Nix 2022-09-18 15:01:34 +00:00