diff options
author | Vincent Ambo <mail@tazj.in> | 2023-01-29T20·40+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2023-02-03T18·47+0000 |
commit | 32698766ef05c1c5f65a2fdbb8d08c558d793dec (patch) | |
tree | a26db2d62544a323f86b1a9cfab40c008ccc761b /.mailmap | |
parent | f2afd38f2d9e4695f814d332cf2352572d8ab8d6 (diff) |
refactor(tvix/eval): statically resolve select from constant attrs r/5831
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>
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions