From: Ulya Trofimovich Date: Tue, 19 Feb 2019 21:44:38 +0000 (+0000) Subject: libre2c: deleted unused buffers. X-Git-Tag: 1.2~145 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=914ec412429c99daa3fc169350b1eb6823a33b4f;p=re2c libre2c: deleted unused buffers. --- diff --git a/re2c/lib/regex_impl.h b/re2c/lib/regex_impl.h index ecb9f1e1..1ae4798b 100644 --- a/re2c/lib/regex_impl.h +++ b/re2c/lib/regex_impl.h @@ -27,10 +27,8 @@ struct history_t static const int32_t ROOT; std::vector nodes; - tag_path_t path1; - tag_path_t path2; - history_t(size_t nstates, size_t ntags); + explicit history_t(size_t nstates); inline const node_t &at(int32_t i) const { return nodes[static_cast(i)]; } inline int32_t push(int32_t i, uint32_t step, tag_info_t info, uint32_t orig); FORBID_COPY(history_t); diff --git a/re2c/lib/regexec.cc b/re2c/lib/regexec.cc index 44b3bcfd..7770e2c3 100644 --- a/re2c/lib/regexec.cc +++ b/re2c/lib/regexec.cc @@ -75,7 +75,7 @@ simctx_t::simctx_t(const nfa_t *nfa, size_t re_nsub, int flags) , flags(flags) , reach() , state() - , hist(nfa->size, nfa->tags.size()) + , hist(nfa->size) , hidx(history_t::ROOT) , step(0) , rule(Rule::NONE) @@ -151,14 +151,10 @@ void init(simctx_t &ctx, const char *string) DASSERT(ctx.gtop_heap.empty()); } -history_t::history_t(size_t nstates, size_t ntags) +history_t::history_t(size_t nstates) : nodes() - , path1() - , path2() { nodes.reserve(nstates); - path1.reserve(ntags); - path2.reserve(ntags); } } // namespace libre2c