diff options
author | Ben Burdette <bburdette@gmail.com> | 2022-01-03 18:13:16 -0700 |
---|---|---|
committer | Ben Burdette <bburdette@gmail.com> | 2022-01-03 18:13:16 -0700 |
commit | c6691089814ac16eb02bab968a97ea2b0fe942f2 (patch) | |
tree | 20e579ef291f647dfdbb0f0f36e75bfbc497c80c /src/libcmd/command.cc | |
parent | a47de1ac37841c29e1a4a7d3a9c50e96390ebaf6 (diff) |
merge cleanup
Diffstat (limited to 'src/libcmd/command.cc')
-rw-r--r-- | src/libcmd/command.cc | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc index b254a90f0..252bc1fad 100644 --- a/src/libcmd/command.cc +++ b/src/libcmd/command.cc @@ -68,7 +68,13 @@ extern std::function<void(const Error & error, const Env & env, const Expr & exp ref<EvalState> EvalCommand::getEvalState() { if (!evalState) { - evalState = std::make_shared<EvalState>(searchPath, getEvalStore(), getStore()); + evalState = +#if HAVE_BOEHMGC + std::allocate_shared<EvalState>(traceable_allocator<EvalState>(), +#else + std::make_shared<EvalState>( +#endif + searchPath, getEvalStore(), getStore()); if (startReplOnEvalErrors) debuggerHook = [evalState{ref<EvalState>(evalState)}](const Error & error, const Env & env, const Expr & expr) { printError("%s\n\n" ANSI_BOLD "Starting REPL to allow you to inspect the current state of the evaluator.\n" ANSI_NORMAL, error.what()); @@ -96,18 +102,6 @@ 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) { |