Skip to content

Commit

Permalink
concatStrings: Give compiler access to definition for inlining
Browse files Browse the repository at this point in the history
... at call sites that are may be in the hot path.

I do not know how clever the compiler gets at these sites.
My primary concern is to not regress performance and I am confident
that this achieves it the easy way.
  • Loading branch information
roberth committed Jul 14, 2024
1 parent 97e0110 commit 7e604f7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libexpr/eval.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@

#endif

#include "strings-inline.hh"

using json = nlohmann::json;

namespace nix {
Expand Down
2 changes: 2 additions & 0 deletions src/libexpr/nixexpr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include <cstdlib>
#include <sstream>

#include "strings-inline.hh"

namespace nix {

unsigned long Expr::nrExprs = 0;
Expand Down
2 changes: 2 additions & 0 deletions src/libstore/derivations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include <boost/container/small_vector.hpp>
#include <nlohmann/json.hpp>

#include "strings-inline.hh"

namespace nix {

std::optional<StorePath> DerivationOutput::path(const StoreDirConfig & store, std::string_view drvName, OutputNameView outputName) const
Expand Down
1 change: 1 addition & 0 deletions src/libutil/canon-path.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "canon-path.hh"
#include "util.hh"
#include "file-path-impl.hh"
#include "strings-inline.hh"

namespace nix {

Expand Down
2 changes: 2 additions & 0 deletions src/libutil/file-system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
# include <io.h>
#endif

#include "strings-inline.hh"

namespace fs = std::filesystem;

namespace nix {
Expand Down

0 comments on commit 7e604f7

Please sign in to comment.