diff options
author | Griffin Smith <grfn@gws.fyi> | 2020-07-12T17·13-0400 |
---|---|---|
committer | glittershark <grfn@gws.fyi> | 2020-07-13T23·50+0000 |
commit | 98148e671130c93d5c292ab560628eb8b8acee8a (patch) | |
tree | bb9862f4e85910395208caedfd50cac09a1f4c9c /third_party/nix/src/nix-env/user-env.cc | |
parent | cc12188d31be955ed9c7f79a1d23c36e73f16c99 (diff) |
refactor(3p/nix): Abstract away concrete bindings impl r/1283
To pave the way for the thing we want to do eventually which is use a linear-time array for bindings (aka attribute sets) that are statically known to be small enough to get a performance benefit from doing so, make the Bindings class abstract, and define a BTreeBindings class that inherits from it and is (currently always) returned from the static initializer. The idea is that we'll have an ArrayBindings class as well later that we can dispatch to conditionally based on an optional "capacity" parameter or something like that. There was some difficulty here in getting the iterator to work - the approach we settled on ended up making a concrete BindingsIterator class which will wrap a std::variant of either a btree iterator or something else later, but right now just wraps a btree iterator. Paired-With: Luke Granger-Brown <git@lukegb.com> Paired-With: Vincent Ambo <mail@tazj.in> Paired-With: Perry Lorier <isomer@tvl.fyi> Change-Id: Ie02ca5a1c55e8ebf99ab1e957110bd9284278907 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1121 Tested-by: BuildkiteCI Reviewed-by: isomer <isomer@tvl.fyi>
Diffstat (limited to 'third_party/nix/src/nix-env/user-env.cc')
0 files changed, 0 insertions, 0 deletions