From 9554a1ae2925f6faf926b2ab6042eff7a5141fb4 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Wed, 27 Nov 2024 02:09:08 +0100 Subject: [PATCH] libexpr: remove dead code Change-Id: Ife3a23822102b6038401e4944777392836039472 --- lix/libexpr/attr-set.cc | 17 ----------------- lix/libexpr/eval-error.hh | 2 -- lix/libexpr/eval.hh | 5 ----- 3 files changed, 24 deletions(-) diff --git a/lix/libexpr/attr-set.cc b/lix/libexpr/attr-set.cc index 78cf87884..8097d4bbb 100644 --- a/lix/libexpr/attr-set.cc +++ b/lix/libexpr/attr-set.cc @@ -25,23 +25,6 @@ Bindings * EvalState::allocBindings(size_t capacity) } -/* Create a new attribute named 'name' on an existing attribute set stored - in 'vAttrs' and return the newly allocated Value which is associated with - this attribute. */ -Value * EvalState::allocAttr(Value & vAttrs, Symbol name) -{ - Value * v = allocValue(); - vAttrs.attrs->push_back(Attr(name, v)); - return v; -} - - -Value * EvalState::allocAttr(Value & vAttrs, std::string_view name) -{ - return allocAttr(vAttrs, symbols.create(name)); -} - - Value & BindingsBuilder::alloc(Symbol name, PosIdx pos) { auto value = state.allocValue(); diff --git a/lix/libexpr/eval-error.hh b/lix/libexpr/eval-error.hh index 16e4e55b6..db2643b47 100644 --- a/lix/libexpr/eval-error.hh +++ b/lix/libexpr/eval-error.hh @@ -87,8 +87,6 @@ public: [[nodiscard, gnu::noinline]] EvalErrorBuilder & withTrace(PosIdx pos, const std::string_view text); - [[nodiscard, gnu::noinline]] EvalErrorBuilder & withFrameTrace(PosIdx pos, const std::string_view text); - [[nodiscard, gnu::noinline]] EvalErrorBuilder & withSuggestions(Suggestions & s); [[nodiscard, gnu::noinline]] EvalErrorBuilder & withFrame(const Env & e, const Expr & ex); diff --git a/lix/libexpr/eval.hh b/lix/libexpr/eval.hh index 841ee56a5..26a43f08b 100644 --- a/lix/libexpr/eval.hh +++ b/lix/libexpr/eval.hh @@ -290,8 +290,6 @@ public: std::shared_ptr buildStore = nullptr); ~EvalState(); - SearchPath getSearchPath() { return searchPath; } - /** * Return a `SourcePath` that refers to `path` in the root * filesystem. @@ -614,9 +612,6 @@ public: inline Value * allocValue(); inline Env & allocEnv(size_t size); - Value * allocAttr(Value & vAttrs, Symbol name); - Value * allocAttr(Value & vAttrs, std::string_view name); - Bindings * allocBindings(size_t capacity); BindingsBuilder buildBindings(size_t capacity)