about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/primops
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-22T02·35+0100
committerVincent Ambo <tazjin@google.com>2020-05-22T02·35+0100
commit68e6e92a20b8ee01de3b89e72fc68517fea6f70c (patch)
treeeb44f148e6cabe0d9281d861a379f7c19cd2783a /third_party/nix/src/libexpr/primops
parent986a8f6b75ffa51682cbe730c5c2907296082cd4 (diff)
chore(3p/nix/libexpr): Delete Bindings::sort r/803
This function does nothing anymore since the attributes are always
in-order.
Diffstat (limited to 'third_party/nix/src/libexpr/primops')
-rw-r--r--third_party/nix/src/libexpr/primops/context.cc2
-rw-r--r--third_party/nix/src/libexpr/primops/fetchGit.cc4
-rw-r--r--third_party/nix/src/libexpr/primops/fetchMercurial.cc4
-rw-r--r--third_party/nix/src/libexpr/primops/fromTOML.cc2
4 files changed, 4 insertions, 8 deletions
diff --git a/third_party/nix/src/libexpr/primops/context.cc b/third_party/nix/src/libexpr/primops/context.cc
index 1661ffbe2e88..2ae8ba8aa99e 100644
--- a/third_party/nix/src/libexpr/primops/context.cc
+++ b/third_party/nix/src/libexpr/primops/context.cc
@@ -126,9 +126,7 @@ static void prim_getContext(EvalState& state, const Pos& pos, Value** args,
         mkString(*(outputsVal.listElems()[i++] = state.allocValue()), output);
       }
     }
-    infoVal.attrs->sort();
   }
-  v.attrs->sort();
 }
 
 static RegisterPrimOp r4("__getContext", 1, prim_getContext);
diff --git a/third_party/nix/src/libexpr/primops/fetchGit.cc b/third_party/nix/src/libexpr/primops/fetchGit.cc
index cb4c008cdd3a..67641258d518 100644
--- a/third_party/nix/src/libexpr/primops/fetchGit.cc
+++ b/third_party/nix/src/libexpr/primops/fetchGit.cc
@@ -252,10 +252,10 @@ static void prim_fetchGit(EvalState& state, const Pos& pos, Value** args,
            gitInfo.shortRev);
   mkInt(*state.allocAttr(v, state.symbols.Create("revCount")),
         gitInfo.revCount);
-  v.attrs->sort();
 
-  if (state.allowedPaths)
+  if (state.allowedPaths) {
     state.allowedPaths->insert(state.store->toRealPath(gitInfo.storePath));
+  }
 }
 
 static RegisterPrimOp r("fetchGit", 1, prim_fetchGit);
diff --git a/third_party/nix/src/libexpr/primops/fetchMercurial.cc b/third_party/nix/src/libexpr/primops/fetchMercurial.cc
index 1e7064f97d9f..9223f1c3ca99 100644
--- a/third_party/nix/src/libexpr/primops/fetchMercurial.cc
+++ b/third_party/nix/src/libexpr/primops/fetchMercurial.cc
@@ -226,10 +226,10 @@ static void prim_fetchMercurial(EvalState& state, const Pos& pos, Value** args,
   mkString(*state.allocAttr(v, state.symbols.Create("shortRev")),
            std::string(hgInfo.rev, 0, 12));
   mkInt(*state.allocAttr(v, state.symbols.Create("revCount")), hgInfo.revCount);
-  v.attrs->sort();
 
-  if (state.allowedPaths)
+  if (state.allowedPaths) {
     state.allowedPaths->insert(state.store->toRealPath(hgInfo.storePath));
+  }
 }
 
 static RegisterPrimOp r("fetchMercurial", 1, prim_fetchMercurial);
diff --git a/third_party/nix/src/libexpr/primops/fromTOML.cc b/third_party/nix/src/libexpr/primops/fromTOML.cc
index 320b6120e746..cc7b3cfcc33e 100644
--- a/third_party/nix/src/libexpr/primops/fromTOML.cc
+++ b/third_party/nix/src/libexpr/primops/fromTOML.cc
@@ -35,8 +35,6 @@ static void prim_fromTOML(EvalState& state, const Pos& pos, Value** args,
         } else
           visit(v2, i.second);
       }
-
-      v.attrs->sort();
     }
 
     else if (auto t2 = t->as_array()) {