diff options
author | Vincent Ambo <mail@tazj.in> | 2022-08-09T15·49+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-08-13T20·24+0000 |
commit | 175eb975059e5a36444453d7b63839c5339cd003 (patch) | |
tree | 6d6b0d5a8435654920c78b65e0512b24b22eb9e2 /tvix/eval/src/compiler.rs | |
parent | ec1770f95ac33e3cfdb57c84f2b94fa63fbc0fb2 (diff) |
feat(tvix/eval): construct internal attribute path representation r/4439
This is required for constructing nested attribute sets at runtime. There'll be quite a lot of optimisation potential with this solution eventually, if it should turn out to be a bottleneck. This introduces a conceptual change, in that the `Value` enum is now an enum representing "all runtime values" instead of "all Nix language types". This makes sense in general, as this type will also contain Chunk representations etc. which are not exposed to users. Change-Id: Ic5f72b2a0965b146c6a451efad34c6a81ca1aad8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6103 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
Diffstat (limited to '')
-rw-r--r-- | tvix/eval/src/compiler.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/eval/src/compiler.rs b/tvix/eval/src/compiler.rs index 5da844448860..5b6f748dc72d 100644 --- a/tvix/eval/src/compiler.rs +++ b/tvix/eval/src/compiler.rs @@ -224,7 +224,7 @@ impl Compiler { // otherwise we need to emit an instruction to construct // the attribute path. if key_count > 1 { - todo!("emit OpAttrPath(n) instruction") + self.chunk.add_op(OpCode::OpAttrPath(2)); } // The value is just compiled as normal so that its |