diff options
author | Ben Burdette <bburdette@gmail.com> | 2022-01-03 16:08:28 -0700 |
---|---|---|
committer | Ben Burdette <bburdette@gmail.com> | 2022-01-03 16:08:28 -0700 |
commit | a47de1ac37841c29e1a4a7d3a9c50e96390ebaf6 (patch) | |
tree | 54819b34b9e090cf32c1ba6865ab9a0af60a9182 /src/libcmd/command.cc | |
parent | 5954cbf3e9dca0e3b84e4bf2def74abb3d6f80cd (diff) | |
parent | 96d08fcd66e2c38598bab4f39a37a98d58347467 (diff) |
Merge branch 'master' into debug-exploratory-PR
Diffstat (limited to 'src/libcmd/command.cc')
-rw-r--r-- | src/libcmd/command.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc index e44c737f5..b254a90f0 100644 --- a/src/libcmd/command.cc +++ b/src/libcmd/command.cc @@ -96,6 +96,18 @@ ref<Store> EvalCommand::getEvalStore() return ref<Store>(evalStore); } +ref<EvalState> EvalCommand::getEvalState() +{ + if (!evalState) evalState = +#if HAVE_BOEHMGC + std::allocate_shared<EvalState>(traceable_allocator<EvalState>(), +#else + std::make_shared<EvalState>( +#endif + searchPath, getEvalStore(), getStore()); + return ref<EvalState>(evalState); +} + BuiltPathsCommand::BuiltPathsCommand(bool recursive) : recursive(recursive) { |