about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/attr-set.cc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-05-23 r/828 refactor(3p/nix/libexpr): Make other 'const' in Bindings::mergeVincent Ambo1-7/+4
2020-05-23 r/821 fix(3p/nix/libexpr): Remove the global empty attribute setVincent Ambo1-4/+0
In the change to the backing structure of attribute sets, the requirement to manually balance the capacity of the structure went away. This is a) because Abseil's data structures manage this on their own, and b) because the new Bindings class is allocated using `new (GC)` rather than writing into a predefined memory area. As part of this change functions related to the capacity were deprecated and set to 0 values, which in turn caused the creation of new attribute sets to return the same (mutable!) default value in various cases, leading to "side effects" that caused evaluation failures. FWIW, I'm not sure if this optimisation had noticeable performance impact, but while untangling libexpr it definitely doesn't help trying to follow what it's doing - so bye, bye!
2020-05-23 r/818 chore(3p/nix/libexpr): Expose separate insert & "upsert" methodsVincent Ambo1-1/+6
Reading more through the old code, it seems like the intention /sometimes/ is to replace values.
2020-05-22 r/813 fix(3p/nix/libexpr): Do not allow duplicate attribute insertionVincent Ambo1-3/+17
This is closer to bug-for-bug compatibility with the previous version, which would put new elements at the end of the array and (due to the linear scan) return previous ones.
2020-05-22 r/805 refactor(3p/nix/libexpr): state->allocBindings -> Bindings::NewGCVincent Ambo1-5/+2
EvalState::allocBindings had little to do with Bindings, other than returning them, and didn't belong in that class.
2020-05-22 r/804 fix(3p/nix/libexpr): Make new Bindings class visible to GCVincent Ambo1-6/+8
2020-05-22 r/803 chore(3p/nix/libexpr): Delete Bindings::sortVincent Ambo1-3/+0
This function does nothing anymore since the attributes are always in-order.
2020-05-22 r/802 fix(3p/nix): Update for usage of new attribute set APIVincent Ambo1-6/+2
The new attribute set API uses the iterators of the btree_map directly. This requires changes in various files because the internals of libexpr are very entangled. This code runs and compiles, but there is a bug causing empty attribute sets to be assigned incorrectly.
2020-05-22 r/801 refactor(3p/nix/libexpr): Use absl::btree_map::iterator typeVincent Ambo1-3/+8
Instead of using a custom Args* iterator, use the one belonging to the map type directly.
2020-05-22 r/800 refactor(3p/nix/libexpr): Use absl::btree_map::merge for '//'Vincent Ambo1-0/+8
Instead of doing some sort of inline merge-sort of the two attribute sets, use the attribute sets merge function. This commit alone does not build and is not supposed to.
2020-05-21 r/799 refactor(3p/nix/libexpr): Use absl::btree_map for AttrSetsVincent Ambo1-11/+38
This is the first step towards replacing the implementation of attribute sets with an absl::btree_map. Currently many access are done using array offsets and pointer arithmetic, so this change is currently causing Nix to fail in various ways.
2020-05-19 r/777 style(3p/nix): Final act in the brace-wrapping sagaVincent Ambo1-1/+2
This last change set was generated by a full clang-tidy run (including compilation): clang-tidy -p ~/projects/nix-build/ \ -checks=-*,readability-braces-around-statements -fix src/*/*.cc Actually running clang-tidy requires some massaging to make it play nice with Nix + meson, I'll be adding a wrapper or something for that soon.
2020-05-19 r/766 style(3p/nix): Reformat all includes to match new styleVincent Ambo1-0/+2
2020-05-17 r/740 style(3p/nix): Reformat project in Google C++ styleVincent Ambo1-34/+22
Reformatted with: fd . -e hh -e cc | xargs clang-format -i
2020-05-17 r/724 Add 'third_party/nix/' from commit 'be66c7a6b24e3c3c6157fd37b86c7203d14acf10'Vincent Ambo1-0/+52
git-subtree-dir: third_party/nix git-subtree-mainline: cf8cd640c1adf74a3706efbcb0ea4625da106fb2 git-subtree-split: be66c7a6b24e3c3c6157fd37b86c7203d14acf10