about summary refs log tree commit diff
path: root/README.md (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2022-08-14 r/4443 refactor(tvix/rm): introduce helper for AttrSet Entry APIVincent Ambo1-20/+27
There are multiple points where an insertion needs to be done into an attribute set, but copying the key or checking for presence before insertion should be avoided As that is a little bit noisy, it's been factored out into a helper function in this commit. Change-Id: Ibcb054ebeb25a1236c06c812f47c8e74180d4fc9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6107 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2022-08-14 r/4442 feat(tvix/vm): implement first nested attribute set constructionVincent Ambo2-39/+134
This can construct non-overlapping nested attribute sets (i.e. `{ a.b = 1; b.c = 2; }`, but not `{ a.b = 1; a.c = 2; }`). In order to do the latter, it's necessary to gain the ability to manipulate the in-progress attribute set construction. There's multiple different options for this ... Change-Id: If1a762a720b175e8eb4216cbf96a7434d22640fb Reviewed-on: https://cl.tvl.fyi/c/depot/+/6106 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2022-08-13 r/4441 refactor(tvix/value): explicitly implement PartialEq for valueVincent Ambo1-1/+26
There are some notions of equality (due to e.g. different backing variants for types, or Nix particularities) that don't work correctly when deriving PartialEq. Change-Id: Ide83ae67d051cc0b3ca89cefb283f17d0207acce Reviewed-on: https://cl.tvl.fyi/c/depot/+/6105 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2022-08-13 r/4440 fix(tvix/eval): Fail on duplicate attribute set keysVincent Ambo2-1/+9
Change-Id: I57373ca76d0e25a5d08a8dfce9d5949099326fc0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6104 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2022-08-13 r/4439 feat(tvix/eval): construct internal attribute path representationVincent Ambo4-1/+30
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
2022-08-13 r/4438 feat(tvix/vm): implement construction of optimised KV attrsetsVincent Ambo1-0/+77
For name/value pairs (which occur extremely often in Nix and make up a significant chunk of the runtime cost of evaluating nixpkgs) we substitute an optimised representation. For now this will only be used if the name/value pair keys were specified as literal identifiers or strings (i.e. if chunks are encountered as keys they are not forced and a normal attribute set backed by a map will be constructed). Change-Id: Ic79746c323e627528bd58b1a6024ee8d0aff7858 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6102 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2022-08-13 r/4437 fix(tvix/value): KV struct needs to carry name as Value, tooVincent Ambo1-1/+2
Users may construct a pair that falls into the name/value optimisation but where `name` is not actually a string, as from the language perspective there is nothing special about this attribute set. We also can not conditionally apply this by forcing the key at this point, as this would change the language semantics. Therefore, the name in the optimised representation is also carried as `Value`. Change-Id: I5be8a4c98ba19ebdfb7203a929f714a04492512e Reviewed-on: https://cl.tvl.fyi/c/depot/+/6101 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
2022-08-13 r/4436 feat(tvix/value): implement Display properly for listsVincent Ambo1-2/+8
Change-Id: I991d235cf52fbd42eb839b384f9c55ee64fa86c4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6100 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2022-08-13 r/4435 fix(tvix/errors): display a useful intermediate error representationVincent Ambo1-1/+1
Change-Id: If979a2aa21444320427f54e6530a55cab873856b Reviewed-on: https://cl.tvl.fyi/c/depot/+/6099 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2022-08-13 r/4434 feat(tvix): implement string interpolationVincent Ambo3-1/+25
This adds a new instruction which assembles an interpolated string from a specified number of fragments, which are already going to be located on the stack in the right position. This will raise a type error if any of the fragments do not evaluate to a string. Change-Id: I5756248fa3e9fcc3d063c14db40b332f7e20a588 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6098 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2022-08-13 r/4433 feat(tvix/compiler): compile non-interpolated string literalsVincent Ambo1-0/+35
This sets up the scaffolding for compiling interpolation, but those instructions do not yet exist. Change-Id: Ife41bbbf432d9661abe566c92437409dd0da44e7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6097 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2022-08-13 r/4432 style(tvix/eval): display `Display` representation of runtime valuesVincent Ambo1-1/+1
Change-Id: Ifbe05c2da9493c9e132a2d2e94a451d6091542a5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6096 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
2022-08-13 r/4431 feat(tvix/compiler): compile list literalsVincent Ambo1-0/+23
Change-Id: I2c6fedc3dbb7d449d700f3972c3fbd4a7d147f6c Reviewed-on: https://cl.tvl.fyi/c/depot/+/6095 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: tazjin <tazjin@tvl.su>
2022-08-13 r/4430 feat(tvix/vm): implement list constructionVincent Ambo2-1/+20
Change-Id: Iec2b4910800ab29daae6d71b58a8acd14ccb1cc1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6094 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: tazjin <tazjin@tvl.su>
2022-08-13 r/4429